Kconfig: Drop CONFIG_EMAC_MDIO_PHY_NUM
Subsystems (2)
PATCH 1/8 Kconfig: Drop CONFIG_EMAC_MDIO_PHY_NUM
This particular macro hasn't been used in the code for some time, remove these references that were missed.
--- include/configs/calimain.h | 1 - include/configs/ea20.h | 1 - include/configs/omapl138_lcdk.h | 1 - include/configs/tam3517-common.h | 1 - scripts/config_whitelist.txt | 1 - 5 files changed, 5 deletions(-)
include/configs/calimain.h +0 -1
@@ -176,7 +176,6 @@* Network & Ethernet Configuration */ #ifdef CONFIG_DRIVER_TI_EMAC -#define CONFIG_EMAC_MDIO_PHY_NUM 1#define CONFIG_MII #define CONFIG_BOOTP_DNS #define CONFIG_BOOTP_DNS2
include/configs/ea20.h +0 -1
@@ -79,7 +79,6 @@* Network & Ethernet Configuration */ #ifdef CONFIG_DRIVER_TI_EMAC -#define CONFIG_EMAC_MDIO_PHY_NUM 0#define CONFIG_MII #define CONFIG_BOOTP_DNS #define CONFIG_BOOTP_DNS2
include/configs/omapl138_lcdk.h +0 -1
@@ -227,7 +227,6 @@* Network & Ethernet Configuration */ #ifdef CONFIG_DRIVER_TI_EMAC -#define CONFIG_EMAC_MDIO_PHY_NUM 7#define CONFIG_MII #undef CONFIG_DRIVER_TI_EMAC_USE_RMII#define CONFIG_BOOTP_DEFAULT
include/configs/tam3517-common.h +0 -1
@@ -169,7 +169,6 @@#define CONFIG_DRIVER_TI_EMAC #define CONFIG_DRIVER_TI_EMAC_USE_RMII #define CONFIG_MII -#define CONFIG_EMAC_MDIO_PHY_NUM 0#define CONFIG_BOOTP_DNS #define CONFIG_BOOTP_DNS2 #define CONFIG_BOOTP_SEND_HOSTNAME
scripts/config_whitelist.txt +0 -1
@@ -776,7 +776,6 @@ CONFIG_EHCI_MMIO_BIG_ENDIAN CONFIG_EHCI_MXS_PORT0 CONFIG_EHCI_MXS_PORT1 CONFIG_ELBC_NAND_SPL_STATIC_PGSIZE -CONFIG_EMAC_MDIO_PHY_NUM CONFIG_EMAC_NR_START CONFIG_EMAC_PHY_MODE CONFIG_EMIF4
Signature · 1 line
1.9.1
PATCH 2/8 cmd/bdinfo.c: Fix unused function warning
On most architectures we do not call print_std_bdinfo() so mark it with __maybe_unused. Reported by clang-3.8.
--- cmd/bdinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
cmd/bdinfo.c +1 -1
@@ -157,7 +157,7 @@ static inline void print_baudrate(void)#endif } -static inline void print_std_bdinfo (const bd_t *bd) +static inline void __maybe_unused print_std_bdinfo (const bd_t *bd) {print_bi_boot_params (bd);print_bi_mem (bd);
Signature · 1 line
1.9.1
PATCH 3/8 cmd/io.c: Fix comparison of unsigned expression warning
In reply to Tom RiniThe function cmd_get_data_size() returns an int and not unsigned. So we should assign it to an int rather than unsigned so that we can later compare the return value. Reported by clang-3.8.
--- cmd/io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
cmd/io.c +2 -1
@@ -46,7 +46,8 @@ int do_io_iod(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])int do_io_iow (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) { -ulong addr, size, val; +ulong addr, val; +int size;if (argc !=3 )return CMD_RET_USAGE ;
Signature · 1 line
1.9.1
PATCH 4/8 cmd/led.c: Remove unnecessary check on 'cmd' value
In reply to Tom RiniWe first check that if argc is less than 2 we return CMD_RET_USAGE. We then see if argc is greater than 2 and if so call get_led_cmd() to set 'cmd' and otherwise set it to LEDST_COUNT (which will always be positive as it's an enum with 0 already assigned). Therefore the test on if cmd is less than 0 will always be false and simply be omitted. Reported by clang-3.8.
--- cmd/led.c | 2 -- 1 file changed, 2 deletions(-)
cmd/led.c +0 -2
@@ -90,8 +90,6 @@ int do_led(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])return list_leds (); cmd = argc >2 ?get_led_cmd (argv[2 ]) :LEDST_COUNT ; -if (cmd <0 ) -return CMD_RET_USAGE ;#ifdef CONFIG_LED_BLINK if (cmd ==LEDST_BLINK ) {if (argc <4 )
Signature · 1 line
1.9.1
PATCH 5/8 gpio-uclass.c: Fix comparison of unsigned expression warning
In reply to Tom RiniWe declare that gpio_base (which is the base for counting gpios, not an address) is unsigned. Therefore the comparison with >= 0 is always true. As the desire is to allow for this base number to be 0, we can just drop this check. Reported by clang-3.8.
--- drivers/gpio/gpio-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-uclass.c +1 -1
@@ -68,7 +68,7 @@ int dm_gpio_lookup_name(const char *name, struct gpio_desc *desc)if (numeric !=-1 ) { offset = numeric - uc_priv->gpio_base;/* Allow GPIOs to be numbered from 0 */ -if (offset >=0 && offset < uc_priv->gpio_count) +if (offset < uc_priv->gpio_count)break ; }
Signature · 1 line
1.9.1
PATCH 6/8 mmc: Change 'part_config' to be a u8 not char.
In reply to Tom RiniIn some places we check if part_config is set to MMCPART_NOAVAILABLE (0xff). With part_config being a char this is always false. We should be using a u8 to store this value instead, after a quick consultation with the Linux Kernel. Reported by clang-3.8.
--- include/mmc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/mmc.h +1 -1
@@ -430,7 +430,7 @@ struct mmc {u8 part_support;u8 part_attr;u8 wr_rel_set; -char part_config; +u8 part_config;uint tran_speed;uint read_bl_len;uint write_bl_len;
Signature · 1 line
1.9.1
PATCH 7/8 drivers/power/regulator/max77686.c: Fix comparisons of unsigned expressions
In reply to Tom RiniInside of max77686_buck_volt2hex/max77686_buck_hex2volt/max77686_ldo_volt2hex we check that the value we calculate is >= 0 however we declare 'hex' as unsigned int making these always true. Mark these as 'int' instead. We also move hex_max to int as they are constants that are 0x3f/0xff. Given that the above functions are marked as returning an int, make the variables we assign their return value to also be int to be able to catch the error condition now. Reported by clang-3.8.
--- drivers/power/regulator/max77686.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/power/regulator/max77686.c +8 -8
@@ -71,8 +71,8 @@ static const char max77686_buck_out[] = {static int max77686_buck_volt2hex (int buck,int uV) { -unsigned int hex =0 ; -unsigned int hex_max =0 ; +int hex =0 ; +int hex_max =0 ;switch (buck) {case 2 :
@@ -105,7 +105,7 @@ static int max77686_buck_volt2hex(int buck, int uV)static int max77686_buck_hex2volt (int buck,int hex) {unsigned uV =0 ; -unsigned int hex_max =0 ; +int hex_max =0 ;if (hex <0 ) goto bad_hex;
@@ -140,7 +140,7 @@ bad_hex:static int max77686_ldo_volt2hex (int ldo,int uV) { -unsigned int hex =0 ; +int hex =0 ;switch (ldo) {case 1 :
@@ -319,9 +319,9 @@ static int max77686_ldo_modes(int ldo, struct dm_regulator_mode **modesp,static int max77686_ldo_val (struct udevice *dev,int op,int *uV) { -unsigned int hex, adr; +unsigned int adr;unsigned char val; -int ldo, ret; +int hex, ldo, ret;if (op ==PMIC_OP_GET ) *uV =0 ;
@@ -360,9 +360,9 @@ static int max77686_ldo_val(struct udevice *dev, int op, int *uV)static int max77686_buck_val (struct udevice *dev,int op,int *uV) { -unsigned int hex, mask, adr; +unsigned int mask, adr;unsigned char val; -int buck, ret; +int hex, buck, ret; buck = dev->driver_data;if (buck <1 || buck >MAX77686_BUCK_NUM ) {
Signature · 1 line
1.9.1
PATCH 8/8 tpm: Fix comparison of unsigned expression warning
In reply to Tom RiniThe function tpm_xfer returns int so make 'err' be int rather than uint32_t so that we can catch an error condition. Reported by clang-3.8.
--- lib/tpm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
lib/tpm.c +1 -2
@@ -230,10 +230,9 @@ static uint32_t tpm_sendrecv_command(const void *command, void *response, size_t *size_ptr) { struct udevice *dev; -int ret; +int err, ret;uint8_t response_buffer[COMMAND_BUFFER_SIZE ];size_t response_length; -uint32_t err;if (response) { response_length = *size_ptr;
Signature · 1 line
1.9.1
PATCH 5/8 gpio-uclass.c: Fix comparison of unsigned expression warning
In reply to Tom RiniQuoted 6 lines · Tom Rini
We declare that
gpio_base(which is the base for counting gpios, not an address) is unsigned. Therefore the comparison with >= 0 is always true. As the desire is to allow for this base number to be 0, we can just drop this check. Reported by clang-3.8.
Quoted 6 lines
Cc Simon Glass <[email protected]>Signed-off-by Tom Rini <[email protected]>--- drivers/gpio/gpio-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
PATCH 1/8 Kconfig: Drop CONFIG_EMAC_MDIO_PHY_NUM
In reply to Tom RiniQuoted 4 lines · Tom Rini
This particular macro hasn't been used in the code for some time, remove these references that were missed.
Signed-off-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170512/896c1b3c/attachment.sig>
PATCH 2/8 cmd/bdinfo.c: Fix unused function warning
In reply to Tom RiniQuoted 4 lines · Tom Rini
On most architectures we do not call
print_std_bdinfo()so mark it with__maybe_unused. Reported by clang-3.8.Signed-off-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170512/c609f636/attachment.sig>
PATCH 3/8 cmd/io.c: Fix comparison of unsigned expression warning
In reply to Tom RiniQuoted 5 lines · Tom Rini
The function
cmd_get_data_size()returns an int and not unsigned. So we should assign it to an int rather than unsigned so that we can later compare the return value. Reported by clang-3.8.Signed-off-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170512/c405f1e2/attachment.sig>
PATCH 4/8 cmd/led.c: Remove unnecessary check on 'cmd' value
In reply to Tom RiniQuoted 8 lines · Tom Rini
We first check that if argc is less than 2 we return
CMD_RET_USAGE. We then see if argc is greater than 2 and if so callget_led_cmd()to set 'cmd' and otherwise set it toLEDST_COUNT(which will always be positive as it's an enum with 0 already assigned). Therefore the test on if cmd is less than 0 will always be false and simply be omitted. Reported by clang-3.8.Signed-off-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170512/3d8a1cd7/attachment.sig>
PATCH 5/8 gpio-uclass.c: Fix comparison of unsigned expression warning
In reply to Tom RiniQuoted 8 lines · Tom Rini
We declare that
gpio_base(which is the base for counting gpios, not an address) is unsigned. Therefore the comparison with >= 0 is always true. As the desire is to allow for this base number to be 0, we can just drop this check. Reported by clang-3.8.Cc Simon Glass <[email protected]>Signed-off-by Tom Rini <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170512/a2e5629c/attachment.sig>
PATCH 8/8 tpm: Fix comparison of unsigned expression warning
In reply to Tom RiniQuoted 5 lines · Tom Rini
The function
tpm_xferreturns int so make 'err' be int rather thanuint32_tso that we can catch an error condition. Reported by clang-3.8.Signed-off-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170512/304cc495/attachment.sig>
PATCH 6/8 mmc: Change 'part_config' to be a u8 not char.
In reply to Tom RiniHi Tom,
Quoted 7 lines · Tom Rini
In some places we check if
part_configis set toMMCPART_NOAVAILABLE(0xff). Withpart_configbeing a char this is always false. We should be using a u8 to store this value instead, after a quick consultation with the Linux Kernel. Reported by clang-3.8.Cc Jaehoon Chung <[email protected]>Signed-off-by Tom Rini <[email protected]>
Applied to u-boot-mmc. Thanks!
Quoted 18 lines
--- include/mmc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/mmc.h +1
-1@@ -430,7 +430,7 @@ struct mmc {u8 part_support;u8 part_attr;u8 wr_rel_set; -char part_config; +u8 part_config;uint tran_speed;uint read_bl_len;uint write_bl_len;
PATCH 7/8 drivers/power/regulator/max77686.c: Fix comparisons of unsigned expressions
In reply to Tom RiniQuoted 11 lines · Tom Rini
Inside of max77686_buck_volt2hex/max77686_buck_hex2volt/max77686_ldo_volt2hex we check that the value we calculate is >= 0 however we declare 'hex' as unsigned int making these always true. Mark these as 'int' instead. We also move
hex_maxto int as they are constants that are 0x3f/0xff. Given that the above functions are marked as returning an int, make the variables we assign their return value to also be int to be able to catch the error condition now. Reported by clang-3.8.Cc Jaehoon Chung <[email protected]>Signed-off-by Tom Rini <[email protected]>
Applied to u-boot-mmc for pmic. Thanks.
Quoted 62 lines
--- drivers/power/regulator/max77686.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)drivers/power/regulator/max77686.c +8
-8@@ -71,8 +71,8 @@ static const char max77686_buck_out[] = {static int max77686_buck_volt2hex (int buck,int uV) { -unsigned int hex =0 ; -unsigned int hex_max =0 ; +int hex =0 ; +int hex_max =0 ;switch (buck) {case 2 :@@ -105,7 +105,7 @@ static int max77686_buck_volt2hex(int buck, int uV)static int max77686_buck_hex2volt (int buck,int hex) {unsigned uV =0 ; -unsigned int hex_max =0 ; +int hex_max =0 ;if (hex <0 ) goto bad_hex;@@ -140,7 +140,7 @@ bad_hex:static int max77686_ldo_volt2hex (int ldo,int uV) { -unsigned int hex =0 ; +int hex =0 ;switch (ldo) {case 1 :@@ -319,9 +319,9 @@ static int max77686_ldo_modes(int ldo, struct dm_regulator_mode **modesp,static int max77686_ldo_val (struct udevice *dev,int op,int *uV) { -unsigned int hex, adr; +unsigned int adr;unsigned char val; -int ldo, ret; +int hex, ldo, ret;if (op ==PMIC_OP_GET ) *uV =0 ;@@ -360,9 +360,9 @@ static int max77686_ldo_val(struct udevice *dev, int op, int *uV)static int max77686_buck_val (struct udevice *dev,int op,int *uV) { -unsigned int hex, mask, adr; +unsigned int mask, adr;unsigned char val; -int buck, ret; +int hex, buck, ret; buck = dev->driver_data;if (buck <1 || buck >MAX77686_BUCK_NUM ) {