mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Collins <bcollins@watter.com>
To: Nathan Chancellor <nathan@kernel.org>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
	"kernel test robot" <lkp@intel.com>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/5] iio: mcp9600: Recognize chip id for mcp9601
Date: Mon, 18 Aug 2025 11:11:57 -0400	[thread overview]
Message-ID: <81628282-E80B-46BD-851E-6DCC48CCC953@watter.com> (raw)
In-Reply-To: <20250818150659.GA2948920@ax162>


> On Aug 18, 2025, at 11:06 AM, Nathan Chancellor <nathan@kernel.org> wrote:
> 
> Hi Jonathan,
> 
> On Sat, Aug 16, 2025 at 11:02:43AM +0100, Jonathan Cameron wrote:
>> On Sat, 16 Aug 2025 16:46:12 +0800
>> kernel test robot <lkp@intel.com> wrote:
>> 
>>> Hi Ben,
>>> 
>>> kernel test robot noticed the following build warnings:
>>> 
>>> [auto build test WARNING on jic23-iio/togreg]
>>> [also build test WARNING on linus/master v6.17-rc1 next-20250815]
>>> [If your patch is applied to the wrong git tree, kindly drop us a note.
>>> And when submitting patch, we suggest to use '--base' as documented in
>>> https://git-scm.com/docs/git-format-patch#_base_tree_information]
>>> 
>>> url:    https://github.com/intel-lab-lkp/linux/commits/Ben-Collins/dt-bindings-iio-mcp9600-Add-compatible-for-microchip-mcp9601/20250816-005705
>>> base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
>>> patch link:    https://lore.kernel.org/r/20250815164627.22002-4-bcollins%40watter.com
>>> patch subject: [PATCH 3/5] iio: mcp9600: Recognize chip id for mcp9601
>>> config: riscv-randconfig-001-20250816 (https://download.01.org/0day-ci/archive/20250816/202508161646.PDl6V4EU-lkp@intel.com/config)
>>> compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 93d24b6b7b148c47a2fa228a4ef31524fa1d9f3f)
>>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250816/202508161646.PDl6V4EU-lkp@intel.com/reproduce)
>>> 
>>> If you fix the issue in a separate patch/commit (i.e. not just a new version of
>>> the same patch/commit), kindly add following tags
>>> | Reported-by: kernel test robot <lkp@intel.com>
>>> | Closes: https://lore.kernel.org/oe-kbuild-all/202508161646.PDl6V4EU-lkp@intel.com/
>>> 
>>> All warnings (new ones prefixed by >>):
> 
> <trim unrelated -Wnull-pointer-arithmetic>
> 
>>>>> drivers/iio/temperature/mcp9600.c:440:53: warning: invalid conversion specifier '\x0a' [-Wformat-invalid-specifier]  
>>>     440 |                                 "Expected id %02x, but device responded with %02\n",
>>>         |                                                                              ~~~^
>>>   include/linux/dev_printk.h:156:62: note: expanded from macro 'dev_warn'
>>>     156 |         dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
>>>         |                                                                     ^~~
>>>   include/linux/dev_printk.h:19:22: note: expanded from macro 'dev_fmt'
>>>      19 | #define dev_fmt(fmt) fmt
>>>         |                      ^~~
>>>   include/linux/dev_printk.h:110:16: note: expanded from macro 'dev_printk_index_wrap'
>>>     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
>>>         |                              ^~~
>>>>> drivers/iio/temperature/mcp9600.c:441:26: warning: data argument not used by format string [-Wformat-extra-args]  
>>>     440 |                                 "Expected id %02x, but device responded with %02\n",
>>>         |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>     441 |                                  chip_info->chip_id, dev_id);
>>>         |                                                      ^
>>>   include/linux/dev_printk.h:156:70: note: expanded from macro 'dev_warn'
>>>     156 |         dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
>>>         |                                                                     ~~~     ^
>>>   include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
>>>     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
>>>         |                              ~~~    ^
>>>   drivers/iio/temperature/mcp9600.c:428:22: warning: unused variable 'ret' [-Wunused-variable]
>>>     428 |         int ch_sel, dev_id, ret;
>>>         |                             ^~~
>>>   10 warnings generated.
>>> 
>>> 
>>> vim +/x0a +440 drivers/iio/temperature/mcp9600.c
>>> 
>>>   422 
>>>   423 static int mcp9600_probe(struct i2c_client *client)
>>>   424 {
>>>   425 const struct mcp_chip_info *chip_info = i2c_get_match_data(client);
>> 
>> Probably a false positive as I don't think we can probe without something matching and hence
>> that not being NULL but an error check on that match is still a nice to have and should
>> resolve this build warning.  Note there is very little chance a compiler could ever figure
>> out if this can be NULL or not so it's a reasonable warning!
> 
> I am not sure I follow if you are referring to the -Wformat warnings
> above. Isn't it pointing out that the second specifier is missing the
> actual type? Shouldn't it be '%02x' or something of the sort?

That actually was the issue and has already been fixed in follow up.

Thanks

  reply	other threads:[~2025-08-18 15:12 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-15 16:46 [PATCH 0/5] iio: mcp9600: Features and improvements Ben Collins
2025-08-15 16:46 ` [PATCH 1/5] dt-bindings: iio: mcp9600: Add compatible for microchip,mcp9601 Ben Collins
2025-08-16  9:58   ` Jonathan Cameron
2025-08-16 18:55     ` David Lechner
2025-08-17 16:37       ` Ben Collins
2025-08-17 16:51         ` David Lechner
2025-08-17 17:34           ` Ben Collins
2025-08-17 17:59             ` David Lechner
2025-08-17 21:02               ` Ben Collins
2025-08-17 21:10                 ` Ben Collins
2025-08-18  6:42                   ` Krzysztof Kozlowski
2025-08-15 16:46 ` [PATCH 2/5] iio: mcp9600: White space cleanup for tab alignment Ben Collins
2025-08-16  9:59   ` Jonathan Cameron
2025-08-15 16:46 ` [PATCH 3/5] iio: mcp9600: Recognize chip id for mcp9601 Ben Collins
2025-08-16  8:46   ` kernel test robot
2025-08-16 10:02     ` Jonathan Cameron
2025-08-18 15:06       ` Nathan Chancellor
2025-08-18 15:11         ` Ben Collins [this message]
2025-08-18 15:18         ` Jonathan Cameron
2025-08-16 10:04   ` Jonathan Cameron
2025-08-15 16:46 ` [PATCH 4/5] iio: mcp9600: Add support for thermocouple-type Ben Collins
2025-08-16 10:11   ` Jonathan Cameron
2025-08-16 13:18     ` Ben Collins
2025-08-16 15:09       ` Jonathan Cameron
2025-08-16 18:24   ` David Lechner
2025-08-17  2:54     ` Ben Collins
2025-08-17  3:32       ` David Lechner
2025-08-15 16:46 ` [PATCH 5/5] iio: mcp9600: Add support for IIR filter Ben Collins
2025-08-16 10:15   ` Jonathan Cameron
2025-08-16 17:22   ` David Lechner
2025-08-16 10:07 ` [PATCH 0/5] iio: mcp9600: Features and improvements Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=81628282-E80B-46BD-851E-6DCC48CCC953@watter.com \
    --to=bcollins@watter.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=nathan@kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®