Просмотр исходного кода

style(class): remove device warning logs for memory

Signed-off-by: sakumisu <1203593632@qq.com>
sakumisu 3 недель назад
Родитель
Сommit
08d1ce4ab5

+ 0 - 8
class/audio/usbd_audio.c

@@ -49,7 +49,6 @@ static int audio_class_endpoint_request_handler(uint8_t busid, struct usb_setup_
 
             break;
         default:
-            USB_LOG_WRN("Unhandled Audio Class control selector 0x%02x\r\n", control_selector);
             return -1;
     }
     return 0;
@@ -109,7 +108,6 @@ static int audio_class_interface_request_handler(uint8_t busid, struct usb_setup
                                 *len = 1;
                                 break;
                             default:
-                                USB_LOG_WRN("Unhandled Audio Class bRequest 0x%02x in cs 0x%02x\r\n", setup->bRequest, control_selector);
                                 return -1;
                         }
                     } else {
@@ -124,7 +122,6 @@ static int audio_class_interface_request_handler(uint8_t busid, struct usb_setup
                                 }
                                 break;
                             default:
-                                //USB_LOG_WRN("Unhandled Audio Class bRequest 0x%02x in cs 0x%02x\r\n", setup->bRequest, control_selector);
                                 return -1;
                         }
                     }
@@ -169,7 +166,6 @@ static int audio_class_interface_request_handler(uint8_t busid, struct usb_setup
                                 *len = 2;
                                 break;
                             default:
-                                USB_LOG_WRN("Unhandled Audio Class bRequest 0x%02x in cs 0x%02x\r\n", setup->bRequest, control_selector);
                                 return -1;
                         }
                     } else {
@@ -207,14 +203,12 @@ static int audio_class_interface_request_handler(uint8_t busid, struct usb_setup
                                 }
                                 break;
                             default:
-                                //USB_LOG_WRN("Unhandled Audio Class bRequest 0x%02x in cs 0x%02x\r\n", setup->bRequest, control_selector);
                                 return -1;
                         }
                     }
                     break;
 
                 default:
-                    USB_LOG_WRN("Unhandled Audio Class cs 0x%02x \r\n", control_selector);
                     return -1;
             }
             break;
@@ -247,7 +241,6 @@ static int audio_class_interface_request_handler(uint8_t busid, struct usb_setup
                             }
                             break;
                         default:
-                            //USB_LOG_WRN("Unhandled Audio Class bRequest 0x%02x in cs 0x%02x\r\n", setup->bRequest, control_selector);
                             return -1;
                     }
                     break;
@@ -261,7 +254,6 @@ static int audio_class_interface_request_handler(uint8_t busid, struct usb_setup
                     break;
 
                 default:
-                    //USB_LOG_WRN("Unhandled Audio Class cs 0x%02x \r\n", control_selector);
                     return -1;
             }
             break;

+ 0 - 1
class/cdc/usbd_cdc_acm.c

@@ -76,7 +76,6 @@ static int cdc_acm_class_interface_request_handler(uint8_t busid, struct usb_set
             usbd_cdc_acm_send_break(busid, intf_num);
             break;
         default:
-            USB_LOG_WRN("Unhandled CDC Class bRequest 0x%02x\r\n", setup->bRequest);
             return -1;
     }
 

+ 0 - 1
class/cdc/usbd_cdc_ecm.c

@@ -106,7 +106,6 @@ static int cdc_ecm_class_interface_request_handler(uint8_t busid, struct usb_set
 #endif
             break;
         default:
-            USB_LOG_WRN("Unhandled CDC ECM Class bRequest 0x%02x\r\n", setup->bRequest);
             return -1;
     }
 

+ 0 - 1
class/hid/usbd_hid.c

@@ -41,7 +41,6 @@ static int hid_class_interface_request_handler(uint8_t busid, struct usb_setup_p
             break;
 
         default:
-            USB_LOG_WRN("Unhandled HID Class bRequest 0x%02x\r\n", setup->bRequest);
             return -1;
     }
 

+ 0 - 1
class/msc/usbd_msc.c

@@ -89,7 +89,6 @@ static int msc_storage_class_interface_request_handler(uint8_t busid, struct usb
             break;
 
         default:
-            USB_LOG_WRN("Unhandled MSC Class bRequest 0x%02x\r\n", setup->bRequest);
             return -1;
     }
 

+ 0 - 23
class/video/usbd_video.c

@@ -44,7 +44,6 @@ static int usbd_video_control_request_handler(uint8_t busid, struct usb_setup_pa
                 case VIDEO_REQUEST_GET_INFO:
                     break;
                 default:
-                    USB_LOG_WRN("Unhandled Video Class bRequest 0x%02x\r\n", setup->bRequest);
                     return -1;
             }
 
@@ -58,7 +57,6 @@ static int usbd_video_control_request_handler(uint8_t busid, struct usb_setup_pa
                 case VIDEO_REQUEST_GET_INFO:
                     break;
                 default:
-                    USB_LOG_WRN("Unhandled Video Class bRequest 0x%02x\r\n", setup->bRequest);
                     return -1;
             }
 
@@ -91,7 +89,6 @@ static int usbd_video_control_unit_terminal_request_handler(uint8_t busid, struc
                                         *len = 1;
                                         break;
                                     default:
-                                        USB_LOG_WRN("Unhandled Video Class bRequest 0x%02x\r\n", setup->bRequest);
                                         return -1;
                                 }
                                 break;
@@ -127,7 +124,6 @@ static int usbd_video_control_unit_terminal_request_handler(uint8_t busid, struc
                                         *len = 4;
                                     } break;
                                     default:
-                                        USB_LOG_WRN("Unhandled Video Class bRequest 0x%02x\r\n", setup->bRequest);
                                         return -1;
                                 }
                                 break;
@@ -163,7 +159,6 @@ static int usbd_video_control_unit_terminal_request_handler(uint8_t busid, struc
                                         *len = 2;
                                     } break;
                                     default:
-                                        USB_LOG_WRN("Unhandled Video Class bRequest 0x%02x\r\n", setup->bRequest);
                                         return -1;
                                 }
                                 break;
@@ -199,7 +194,6 @@ static int usbd_video_control_unit_terminal_request_handler(uint8_t busid, struc
                                         *len = 2;
                                     } break;
                                     default:
-                                        USB_LOG_WRN("Unhandled Video Class bRequest 0x%02x\r\n", setup->bRequest);
                                         return -1;
                                 }
                                 break;
@@ -235,7 +229,6 @@ static int usbd_video_control_unit_terminal_request_handler(uint8_t busid, struc
                                         *len = 2;
                                     } break;
                                     default:
-                                        USB_LOG_WRN("Unhandled Video Class bRequest 0x%02x\r\n", setup->bRequest);
                                         return -1;
                                 }
                                 break;
@@ -247,16 +240,13 @@ static int usbd_video_control_unit_terminal_request_handler(uint8_t busid, struc
                                         *len = 2;
                                     } break;
                                     default:
-                                        USB_LOG_WRN("Unhandled Video Class bRequest 0x%02x\r\n", setup->bRequest);
                                         return -1;
                                 }
                                 break;
                             default:
-                                USB_LOG_WRN("Unhandled Video Class control selector 0x%02x\r\n", control_selector);
                                 return -1;
                         }
                     } else {
-                        USB_LOG_WRN("Unhandled Video Class wTerminalType 0x%02x\r\n", entity_info->wTerminalType);
                         return -2;
                     }
                     break;
@@ -298,7 +288,6 @@ static int usbd_video_control_unit_terminal_request_handler(uint8_t busid, struc
                                     *len = 2;
                                 } break;
                                 default:
-                                    USB_LOG_WRN("Unhandled Video Class bRequest 0x%02x\r\n", setup->bRequest);
                                     return -1;
                             }
                             break;
@@ -337,7 +326,6 @@ static int usbd_video_control_unit_terminal_request_handler(uint8_t busid, struc
                                     *len = 2;
                                 } break;
                                 default:
-                                    USB_LOG_WRN("Unhandled Video Class bRequest 0x%02x\r\n", setup->bRequest);
                                     return -1;
                             }
                             break;
@@ -373,7 +361,6 @@ static int usbd_video_control_unit_terminal_request_handler(uint8_t busid, struc
                                     *len = 2;
                                 } break;
                                 default:
-                                    USB_LOG_WRN("Unhandled Video Class bRequest 0x%02x\r\n", setup->bRequest);
                                     return -1;
                             }
                             break;
@@ -409,7 +396,6 @@ static int usbd_video_control_unit_terminal_request_handler(uint8_t busid, struc
                                     *len = 2;
                                 } break;
                                 default:
-                                    USB_LOG_WRN("Unhandled Video Class bRequest 0x%02x\r\n", setup->bRequest);
                                     return -1;
                             }
                             break;
@@ -440,7 +426,6 @@ static int usbd_video_control_unit_terminal_request_handler(uint8_t busid, struc
                                     *len = 2;
                                 } break;
                                 default:
-                                    USB_LOG_WRN("Unhandled Video Class bRequest 0x%02x\r\n", setup->bRequest);
                                     return -1;
                             }
                             break;
@@ -471,7 +456,6 @@ static int usbd_video_control_unit_terminal_request_handler(uint8_t busid, struc
                                     *len = 2;
                                 } break;
                                 default:
-                                    USB_LOG_WRN("Unhandled Video Class bRequest 0x%02x\r\n", setup->bRequest);
                                     return -1;
                             }
                             break;
@@ -502,7 +486,6 @@ static int usbd_video_control_unit_terminal_request_handler(uint8_t busid, struc
                                     *len = 2;
                                 } break;
                                 default:
-                                    USB_LOG_WRN("Unhandled Video Class bRequest 0x%02x\r\n", setup->bRequest);
                                     return -1;
                             }
                             break;
@@ -538,7 +521,6 @@ static int usbd_video_control_unit_terminal_request_handler(uint8_t busid, struc
                                     *len = 2;
                                 } break;
                                 default:
-                                    USB_LOG_WRN("Unhandled Video Class bRequest 0x%02x\r\n", setup->bRequest);
                                     return -1;
                             }
                             break;
@@ -550,13 +532,11 @@ static int usbd_video_control_unit_terminal_request_handler(uint8_t busid, struc
                                     *len = 1;
                                 } break;
                                 default:
-                                    USB_LOG_WRN("Unhandled Video Class bRequest 0x%02x\r\n", setup->bRequest);
                                     return -1;
                             }
                             break;
                         default:
                             g_usbd_video[busid].error_code = 0x06;
-                            USB_LOG_WRN("Unhandled Video Class control selector 0x%02x\r\n", control_selector);
                             return -1;
                     }
                     break;
@@ -606,7 +586,6 @@ static int usbd_video_stream_request_handler(uint8_t busid, struct usb_setup_pac
                     break;
 
                 default:
-                    USB_LOG_WRN("Unhandled Video Class bRequest 0x%02x\r\n", setup->bRequest);
                     return -1;
             }
             break;
@@ -638,7 +617,6 @@ static int usbd_video_stream_request_handler(uint8_t busid, struct usb_setup_pac
                     break;
 
                 default:
-                    USB_LOG_WRN("Unhandled Video Class bRequest 0x%02x\r\n", setup->bRequest);
                     return -1;
             }
             break;
@@ -653,7 +631,6 @@ static int usbd_video_stream_request_handler(uint8_t busid, struct usb_setup_pac
                     *len = 1;
                     break;
                 default:
-                    USB_LOG_WRN("Unhandled Video Class bRequest 0x%02x\r\n", setup->bRequest);
                     return -1;
             }
             break;

+ 0 - 5
class/wireless/usbd_rndis.c

@@ -365,14 +365,9 @@ static int rndis_set_cmd_handler(uint8_t *data, uint32_t len)
 
     switch (cmd->Oid) {
         case OID_GEN_RNDIS_CONFIG_PARAMETER:
-            param = (rndis_config_parameter_t *)((uint8_t *)&(cmd->RequestId) + cmd->InformationBufferOffset);
-            USB_LOG_WRN("RNDIS cfg param: NameOfs=%d, NameLen=%d, ValueOfs=%d, ValueLen=%d\r\n",
-                        param->ParameterNameOffset, param->ParameterNameLength,
-                        param->ParameterValueOffset, param->ParameterValueLength);
             break;
         case OID_GEN_CURRENT_PACKET_FILTER:
             if (cmd->InformationBufferLength < sizeof(g_usbd_rndis.net_filter)) {
-                USB_LOG_WRN("PACKET_FILTER!\r\n");
                 resp->Status = RNDIS_STATUS_INVALID_DATA;
             } else {
                 uint32_t *filter;