From patchwork Wed Jan 1 09:39:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Young X-Patchwork-Id: 11315027 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3935C14E3 for ; Wed, 1 Jan 2020 09:39:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 23E362073D for ; Wed, 1 Jan 2020 09:39:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725876AbgAAJjo (ORCPT ); Wed, 1 Jan 2020 04:39:44 -0500 Received: from gofer.mess.org ([88.97.38.141]:51337 "EHLO gofer.mess.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725783AbgAAJjn (ORCPT ); Wed, 1 Jan 2020 04:39:43 -0500 Received: by gofer.mess.org (Postfix, from userid 1000) id 31A9411A001; Wed, 1 Jan 2020 09:39:42 +0000 (GMT) From: Sean Young To: linux-media@vger.kernel.org Subject: [PATCH 1/4] media: dib7000m: incorrect format specifier detected by clang Date: Wed, 1 Jan 2020 09:39:39 +0000 Message-Id: <20200101093942.15865-1-sean@mess.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org drivers/media/dvb-frontends/dib7000m.c:811:38: warning: format specifies type 'short' but the argument has type 'u8' (aka 'unsigned char') [-Wformat] dprintk("SPLIT %p: %hd\n", demod, agc_split); ~~~ ^~~~~~~~~ %hhu Signed-off-by: Sean Young --- drivers/media/dvb-frontends/dib7000m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/dvb-frontends/dib7000m.c b/drivers/media/dvb-frontends/dib7000m.c index e211830c9c99..97ce97789c9e 100644 --- a/drivers/media/dvb-frontends/dib7000m.c +++ b/drivers/media/dvb-frontends/dib7000m.c @@ -808,7 +808,7 @@ static int dib7000m_agc_startup(struct dvb_frontend *demod) dib7000m_restart_agc(state); - dprintk("SPLIT %p: %hd\n", demod, agc_split); + dprintk("SPLIT %p: %u\n", demod, agc_split); (*agc_state)++; ret = 5; From patchwork Wed Jan 1 09:39:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Young X-Patchwork-Id: 11315025 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 79C1C138C for ; Wed, 1 Jan 2020 09:39:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 536B42073D for ; Wed, 1 Jan 2020 09:39:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725872AbgAAJjn (ORCPT ); Wed, 1 Jan 2020 04:39:43 -0500 Received: from gofer.mess.org ([88.97.38.141]:39187 "EHLO gofer.mess.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725787AbgAAJjn (ORCPT ); Wed, 1 Jan 2020 04:39:43 -0500 Received: by gofer.mess.org (Postfix, from userid 1000) id 42D2411A002; Wed, 1 Jan 2020 09:39:42 +0000 (GMT) From: Sean Young To: linux-media@vger.kernel.org Subject: [PATCH 2/4] media: dib7000p: incorrect format specifier detected by clang Date: Wed, 1 Jan 2020 09:39:40 +0000 Message-Id: <20200101093942.15865-2-sean@mess.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200101093942.15865-1-sean@mess.org> References: <20200101093942.15865-1-sean@mess.org> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org drivers/media/dvb-frontends/dib7000p.c:918:37: warning: format specifies type 'short' but the argument has type 'u8' (aka 'unsigned char') [-Wformat] dprintk("SPLIT %p: %hd\n", demod, agc_split); ~~~ ^~~~~~~~~ %hhu Signed-off-by: Sean Young --- drivers/media/dvb-frontends/dib7000p.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/dvb-frontends/dib7000p.c b/drivers/media/dvb-frontends/dib7000p.c index 0d22c700016d..0a7790c4bad3 100644 --- a/drivers/media/dvb-frontends/dib7000p.c +++ b/drivers/media/dvb-frontends/dib7000p.c @@ -915,7 +915,7 @@ static int dib7000p_agc_startup(struct dvb_frontend *demod) dib7000p_restart_agc(state); - dprintk("SPLIT %p: %hd\n", demod, agc_split); + dprintk("SPLIT %p: %u\n", demod, agc_split); (*agc_state)++; ret = 5; From patchwork Wed Jan 1 09:39:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Young X-Patchwork-Id: 11315029 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6B79E138C for ; Wed, 1 Jan 2020 09:39:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 44AA52073D for ; Wed, 1 Jan 2020 09:39:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725877AbgAAJjo (ORCPT ); Wed, 1 Jan 2020 04:39:44 -0500 Received: from gofer.mess.org ([88.97.38.141]:50569 "EHLO gofer.mess.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725851AbgAAJjn (ORCPT ); Wed, 1 Jan 2020 04:39:43 -0500 Received: by gofer.mess.org (Postfix, from userid 1000) id 599EC11A003; Wed, 1 Jan 2020 09:39:42 +0000 (GMT) From: Sean Young To: linux-media@vger.kernel.org Subject: [PATCH 3/4] media: dib0070: incorrect format specifiers detected by clang Date: Wed, 1 Jan 2020 09:39:41 +0000 Message-Id: <20200101093942.15865-3-sean@mess.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200101093942.15865-1-sean@mess.org> References: <20200101093942.15865-1-sean@mess.org> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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: Sean Young --- drivers/media/dvb-frontends/dib0070.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/media/dvb-frontends/dib0070.c b/drivers/media/dvb-frontends/dib0070.c index 3b26f61785d8..740050922d14 100644 --- a/drivers/media/dvb-frontends/dib0070.c +++ b/drivers/media/dvb-frontends/dib0070.c @@ -189,7 +189,7 @@ static int dib0070_captrim(struct dib0070_state *state, enum frontend_tune_state adc = dib0070_read_reg(state, 0x19); - dprintk("CAPTRIM=%hd; ADC = %hd (ADC) & %dmV\n", state->captrim, adc, (u32) adc*(u32)1800/(u32)1024); + dprintk("CAPTRIM=%d; ADC = %hd (ADC) & %dmV\n", state->captrim, adc, (u32)adc * (u32)1800 / (u32)1024); if (adc >= 400) { adc -= 400; @@ -200,7 +200,7 @@ static int dib0070_captrim(struct dib0070_state *state, enum frontend_tune_state } if (adc < state->adc_diff) { - dprintk("CAPTRIM=%hd is closer to target (%hd/%hd)\n", state->captrim, adc, state->adc_diff); + dprintk("CAPTRIM=%d is closer to target (%hd/%hd)\n", state->captrim, adc, state->adc_diff); state->adc_diff = adc; state->fcaptrim = state->captrim; } @@ -364,7 +364,7 @@ static int dib0070_tune_digital(struct dvb_frontend *fe) } if (*tune_state == CT_TUNER_START) { - dprintk("Tuning for Band: %hd (%d kHz)\n", band, freq); + dprintk("Tuning for Band: %d (%d kHz)\n", band, freq); if (state->current_rf != freq) { u8 REFDIV; u32 FBDiv, Rest, FREF, VCOF_kHz; @@ -442,12 +442,12 @@ static int dib0070_tune_digital(struct dvb_frontend *fe) dib0070_write_reg(state, 0x20, 0x0040 | 0x0020 | 0x0010 | 0x0008 | 0x0002 | 0x0001 | state->current_tune_table_index->tuner_enable); - dprintk("REFDIV: %hd, FREF: %d\n", REFDIV, FREF); + dprintk("REFDIV: %u, FREF: %d\n", REFDIV, FREF); dprintk("FBDIV: %d, Rest: %d\n", FBDiv, Rest); - dprintk("Num: %hd, Den: %hd, SD: %hd\n", (u16) Rest, Den, (state->lo4 >> 12) & 0x1); - dprintk("HFDIV code: %hd\n", state->current_tune_table_index->hfdiv); - dprintk("VCO = %hd\n", state->current_tune_table_index->vco_band); - dprintk("VCOF: ((%hd*%d) << 1))\n", state->current_tune_table_index->vco_multi, freq); + dprintk("Num: %u, Den: %u, SD: %d\n", (u16)Rest, Den, (state->lo4 >> 12) & 0x1); + dprintk("HFDIV code: %u\n", state->current_tune_table_index->hfdiv); + dprintk("VCO = %u\n", state->current_tune_table_index->vco_band); + dprintk("VCOF: ((%u*%d) << 1))\n", state->current_tune_table_index->vco_multi, freq); *tune_state = CT_TUNER_STEP_0; } else { /* we are already tuned to this frequency - the configuration is correct */ From patchwork Wed Jan 1 09:39:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Young X-Patchwork-Id: 11315031 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 95645138C for ; Wed, 1 Jan 2020 09:39:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7E4AA2072C for ; Wed, 1 Jan 2020 09:39:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725890AbgAAJjp (ORCPT ); Wed, 1 Jan 2020 04:39:45 -0500 Received: from gofer.mess.org ([88.97.38.141]:49147 "EHLO gofer.mess.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725862AbgAAJjo (ORCPT ); Wed, 1 Jan 2020 04:39:44 -0500 Received: by gofer.mess.org (Postfix, from userid 1000) id 73E4F11A004; Wed, 1 Jan 2020 09:39:42 +0000 (GMT) From: Sean Young To: linux-media@vger.kernel.org Subject: [PATCH 4/4] media: dib0090: incorrect format specifier detected by clang Date: Wed, 1 Jan 2020 09:39:42 +0000 Message-Id: <20200101093942.15865-4-sean@mess.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200101093942.15865-1-sean@mess.org> References: <20200101093942.15865-1-sean@mess.org> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org drivers/media/dvb-frontends/dib0090.c:1751:67: warning: format specifies type 'short' but the argument has type 'u8' (aka 'unsigned char') [-Wformat] dprintk("BB Offset Cal, BBreg=%hd,Offset=%hd,Value Set=%hd\n", state->dc->addr, state->adc_diff, state->step); ~~~ ^~~~~~~~~~~~~~~ %hhu drivers/media/dvb-frontends/dib0090.c:30:22: note: expanded from macro 'dprintk' __func__, ##arg); \ ^~~ drivers/media/dvb-frontends/dib0090.c:1751:101: warning: format specifies type 'short' but the argument has type 's8' (aka 'signed char') [-Wformat] dprintk("BB Offset Cal, BBreg=%hd,Offset=%hd,Value Set=%hd\n", state->dc->addr, state->adc_diff, state->step); ~~~ ^~~~~~~~~~~ %hhd drivers/media/dvb-frontends/dib0090.c:30:22: note: expanded from macro 'dprintk' __func__, ##arg); \ ^~~ Signed-off-by: Sean Young --- drivers/media/dvb-frontends/dib0090.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/dvb-frontends/dib0090.c b/drivers/media/dvb-frontends/dib0090.c index d13d2e81f8c9..52af1cf82d94 100644 --- a/drivers/media/dvb-frontends/dib0090.c +++ b/drivers/media/dvb-frontends/dib0090.c @@ -1748,7 +1748,7 @@ static int dib0090_dc_offset_calibration(struct dib0090_state *state, enum front } dib0090_set_trim(state); - dprintk("BB Offset Cal, BBreg=%hd,Offset=%hd,Value Set=%hd\n", state->dc->addr, state->adc_diff, state->step); + dprintk("BB Offset Cal, BBreg=%u,Offset=%d,Value Set=%d\n", state->dc->addr, state->adc_diff, state->step); state->dc++; if (state->dc->addr == 0) /* done */