mirror of
https://github.com/hathach/tinyusb.git
synced 2026-08-18 11:02:16 +00:00
ch32h417: make usbss_phy_cfg return void (unused read-back)
PVS-Studio (V530) flagged the discarded return value of usbss_phy_cfg at every call site. The PHY back-door read-back is only a strobe; the value is never used (matching the WCH EVT demo), so return void. PVS found no other issues in either CH32H417 dcd. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QWhrtHjbSVMKcY68vxBwBm
This commit is contained in:
@ -117,10 +117,10 @@ static void usbss_rcc_init(bool enable) {
|
||||
}
|
||||
}
|
||||
|
||||
static uint32_t usbss_phy_cfg(uint8_t addr, uint16_t data) {
|
||||
static void usbss_phy_cfg(uint8_t addr, uint16_t data) {
|
||||
USBSS_PHY_CFG_CR = (1u << 23) | ((uint32_t)addr << 16) | data;
|
||||
USBSS_PHY_CFG_DAT = 0x01;
|
||||
return USBSS_PHY_CFG_DAT;
|
||||
(void)USBSS_PHY_CFG_DAT; // read-back strobe; the returned value is not used
|
||||
}
|
||||
|
||||
static void usbss_cfg_mod(void) {
|
||||
|
||||
Reference in New Issue
Block a user