• Sean Young's avatar
    media: dib0070: incorrect format specifiers detected by clang · f54def5b
    Sean Young authored
    drivers/media/dvb-frontends/dib0070.c:192:52: warning: format specifies type 'short' but the argument has type 's8' (aka 'signed char') [-Wformat]
                    dprintk("CAPTRIM=%hd; ADC = %hd (ADC) & %dmV\n", state->captrim, adc, (u32) adc*(u32)1800/(u32)1024);
                                     ~~~                             ^~~~~~~~~~~~~~
                                     %hhd
    drivers/media/dvb-frontends/dib0070.c:30:22: note: expanded from macro 'dprintk'
                           __func__, ##arg);                                \
                                       ^~~
    drivers/media/dvb-frontends/dib0070.c:203:59: warning: format specifies type 'short' but the argument has type 's8' (aka 'signed char') [-Wformat]
                            dprintk("CAPTRIM=%hd is closer to target (%hd/%hd)\n", state->captrim, adc, state->adc_diff);
                                             ~~~                                   ^~~~~~~~~~~~~~
                                             %hhd
    drivers/media/dvb-frontends/dib0070.c:30:22: note: expanded from macro 'dprintk'
                           __func__, ##arg);                                \
                                       ^~~
    drivers/media/dvb-frontends/dib0070.c:367:46: warning: format specifies type 'short' but the argument has type 'u8' (aka 'unsigned char') [-Wformat]
                    dprintk("Tuning for Band: %hd (%d kHz)\n", band, freq);
                                              ~~~              ^~~~
                                              %hhu
    drivers/media/dvb-frontends/dib0070.c:30:22: note: expanded from macro 'dprintk'
                           __func__, ##arg);                                \
                                       ^~~
    drivers/media/dvb-frontends/dib0070.c:445:39: warning: format specifies type 'short' but the argument has type 'u8' (aka 'unsigned char') [-Wformat]
                            dprintk("REFDIV: %hd, FREF: %d\n", REFDIV, FREF);
                                             ~~~               ^~~~~~
                                             %hhu
    drivers/media/dvb-frontends/dib0070.c:30:22: note: expanded from macro 'dprintk'
                           __func__, ##arg);                                \
                                       ^~~
    drivers/media/dvb-frontends/dib0070.c:447:57: warning: format specifies type 'short' but the argument has type 'u8' (aka 'unsigned char') [-Wformat]
                            dprintk("Num: %hd, Den: %hd, SD: %hd\n", (u16) Rest, Den, (state->lo4 >> 12) & 0x1);
                                                    ~~~                          ^~~
                                                    %hhu
    drivers/media/dvb-frontends/dib0070.c:30:22: note: expanded from macro 'dprintk'
                           __func__, ##arg);                                \
                                       ^~~
    drivers/media/dvb-frontends/dib0070.c:447:62: warning: format specifies type 'short' but the argument has type 'int' [-Wformat]
                            dprintk("Num: %hd, Den: %hd, SD: %hd\n", (u16) Rest, Den, (state->lo4 >> 12) & 0x1);
                                                             ~~~                      ^~~~~~~~~~~~~~~~~~~~~~~~
                                                             %d
    drivers/media/dvb-frontends/dib0070.c:30:22: note: expanded from macro 'dprintk'
                           __func__, ##arg);                                \
                                       ^~~
    drivers/media/dvb-frontends/dib0070.c:448:33: warning: format specifies type 'short' but the argument has type 'u8' (aka 'unsigned char') [-Wformat]
                            dprintk("HFDIV code: %hd\n", state->current_tune_table_index->hfdiv);
                                                 ~~~     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                 %hhu
    drivers/media/dvb-frontends/dib0070.c:30:22: note: expanded from macro 'dprintk'
                           __func__, ##arg);                                \
                                       ^~~
    drivers/media/dvb-frontends/dib0070.c:449:27: warning: format specifies type 'short' but the argument has type 'u8' (aka 'unsigned char') [-Wformat]
                            dprintk("VCO = %hd\n", state->current_tune_table_index->vco_band);
                                           ~~~     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                           %hhu
    drivers/media/dvb-frontends/dib0070.c:30:22: note: expanded from macro 'dprintk'
                           __func__, ##arg);                                \
                                       ^~~
    drivers/media/dvb-frontends/dib0070.c:450:40: warning: format specifies type 'short' but the argument has type 'u8' (aka 'unsigned char') [-Wformat]
                            dprintk("VCOF: ((%hd*%d) << 1))\n", state->current_tune_table_index->vco_multi, freq);
                                             ~~~                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                             %hhu
    drivers/media/dvb-frontends/dib0070.c:30:22: note: expanded from macro 'dprintk'
                           __func__, ##arg);                                \
                                       ^~~
    Signed-off-by: default avatarSean Young <sean@mess.org>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
    f54def5b
dib0070.c 20 KB