Linux IIO development
 help / color / mirror / Atom feed
* Re: [PATCH] iio: adc: ad7124: Silent no spi_device_id warnings
  2022-09-19 14:59 [PATCH] iio: adc: ad7124: Silent no spi_device_id warnings Wei Yongjun
@ 2022-09-19 14:46 ` Lars-Peter Clausen
  2022-09-19 14:50   ` Wei Yongjun
  2022-09-19 14:50   ` Lars-Peter Clausen
  0 siblings, 2 replies; 7+ messages in thread
From: Lars-Peter Clausen @ 2022-09-19 14:46 UTC (permalink / raw)
  To: Wei Yongjun, Michael Hennerich, Jonathan Cameron; +Cc: Wei Yongjun, linux-iio

On 9/19/22 16:59, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> Add spi_device_id entries to silent following SPI warnings:
>
> SPI driver ad7124 has no spi_device_id for adi,ad7124-4
> SPI driver ad7124 has no spi_device_id for adi,ad7124-8
What generates those warnings?


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] iio: adc: ad7124: Silent no spi_device_id warnings
  2022-09-19 14:46 ` Lars-Peter Clausen
@ 2022-09-19 14:50   ` Wei Yongjun
  2022-09-19 15:53     ` Jonathan Cameron
  2022-09-19 14:50   ` Lars-Peter Clausen
  1 sibling, 1 reply; 7+ messages in thread
From: Wei Yongjun @ 2022-09-19 14:50 UTC (permalink / raw)
  To: Lars-Peter Clausen, Wei Yongjun, Michael Hennerich,
	Jonathan Cameron
  Cc: linux-iio



On 2022/9/19 22:46, Lars-Peter Clausen wrote:
> On 9/19/22 16:59, Wei Yongjun wrote:
>> From: Wei Yongjun <weiyongjun1@huawei.com>
>>
>> Add spi_device_id entries to silent following SPI warnings:
>>
>> SPI driver ad7124 has no spi_device_id for adi,ad7124-4
>> SPI driver ad7124 has no spi_device_id for adi,ad7124-8
> What generates those warnings?
> 

Commit 5fa6863ba692 ("spi: Check we have a spi_device_id for each DT
compatible") added a test to check that every SPI driver has a
spi_device_id for each DT compatiable string defined by the driver
and warns if the spi_device_id is missing.

Regards,
Wei Yongjun

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] iio: adc: ad7124: Silent no spi_device_id warnings
  2022-09-19 14:46 ` Lars-Peter Clausen
  2022-09-19 14:50   ` Wei Yongjun
@ 2022-09-19 14:50   ` Lars-Peter Clausen
  1 sibling, 0 replies; 7+ messages in thread
From: Lars-Peter Clausen @ 2022-09-19 14:50 UTC (permalink / raw)
  To: Wei Yongjun, Michael Hennerich, Jonathan Cameron; +Cc: Wei Yongjun, linux-iio

On 9/19/22 16:46, Lars-Peter Clausen wrote:
> On 9/19/22 16:59, Wei Yongjun wrote:
>> From: Wei Yongjun <weiyongjun1@huawei.com>
>>
>> Add spi_device_id entries to silent following SPI warnings:
>>
>> SPI driver ad7124 has no spi_device_id for adi,ad7124-4
>> SPI driver ad7124 has no spi_device_id for adi,ad7124-8
> What generates those warnings?
>
Ok, found it. 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5fa6863ba69265cb7e45567d12614790ff26bd56

Can you mention this in the commit message, that this is to fix module 
autoloading for the driver? That makes it much more clear why we want to 
fix this.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] iio: adc: ad7124: Silent no spi_device_id warnings
@ 2022-09-19 14:59 Wei Yongjun
  2022-09-19 14:46 ` Lars-Peter Clausen
  0 siblings, 1 reply; 7+ messages in thread
From: Wei Yongjun @ 2022-09-19 14:59 UTC (permalink / raw)
  To: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron
  Cc: Wei Yongjun, linux-iio

From: Wei Yongjun <weiyongjun1@huawei.com>

Add spi_device_id entries to silent following SPI warnings:

SPI driver ad7124 has no spi_device_id for adi,ad7124-4
SPI driver ad7124 has no spi_device_id for adi,ad7124-8

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/iio/adc/ad7124.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/iio/adc/ad7124.c b/drivers/iio/adc/ad7124.c
index 4088786e1026..10a3fc6d26a2 100644
--- a/drivers/iio/adc/ad7124.c
+++ b/drivers/iio/adc/ad7124.c
@@ -1021,12 +1021,20 @@ static const struct of_device_id ad7124_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, ad7124_of_match);
 
+static const struct spi_device_id ad71124_ids[] = {
+	{ "ad7124-4", (kernel_ulong_t)&ad7124_chip_info_tbl[ID_AD7124_4] },
+	{ "ad7124-8", (kernel_ulong_t)&ad7124_chip_info_tbl[ID_AD7124_8] },
+	{ },
+};
+MODULE_DEVICE_TABLE(spi, ad71124_ids);
+
 static struct spi_driver ad71124_driver = {
 	.driver = {
 		.name = "ad7124",
 		.of_match_table = ad7124_of_match,
 	},
 	.probe = ad7124_probe,
+	.id_table = ad71124_ids,
 };
 module_spi_driver(ad71124_driver);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] iio: adc: ad7124: Silent no spi_device_id warnings
  2022-09-19 14:50   ` Wei Yongjun
@ 2022-09-19 15:53     ` Jonathan Cameron
  2022-09-19 15:55       ` Wei Yongjun
  0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Cameron @ 2022-09-19 15:53 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: Lars-Peter Clausen, Wei Yongjun, Michael Hennerich, linux-iio

On Mon, 19 Sep 2022 22:50:35 +0800
Wei Yongjun <weiyongjun1@huawei.com> wrote:

> On 2022/9/19 22:46, Lars-Peter Clausen wrote:
> > On 9/19/22 16:59, Wei Yongjun wrote:  
> >> From: Wei Yongjun <weiyongjun1@huawei.com>
Hi Wei Yongjun,

> >>
> >> Add spi_device_id entries to silent following SPI warnings:

silence rather than silent (also in patch titles)

> >>
> >> SPI driver ad7124 has no spi_device_id for adi,ad7124-4
> >> SPI driver ad7124 has no spi_device_id for adi,ad7124-8  
> > What generates those warnings?
> >   
> 
> Commit 5fa6863ba692 ("spi: Check we have a spi_device_id for each DT
> compatible") added a test to check that every SPI driver has a
> spi_device_id for each DT compatiable string defined by the driver
> and warns if the spi_device_id is missing.

When sending a series of similar fixes to a given subsystem together
it's helpful to group them into a series, so that comments that
apply series wide can easily be easily found.

A cover letter is also useful to provide a little more information on
what is being fixed.


> 
> Regards,
> Wei Yongjun


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] iio: adc: ad7124: Silent no spi_device_id warnings
  2022-09-19 15:53     ` Jonathan Cameron
@ 2022-09-19 15:55       ` Wei Yongjun
  2022-09-19 16:05         ` Jonathan Cameron
  0 siblings, 1 reply; 7+ messages in thread
From: Wei Yongjun @ 2022-09-19 15:55 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Lars-Peter Clausen, Wei Yongjun, Michael Hennerich, linux-iio



On 2022/9/19 23:53, Jonathan Cameron wrote:
> On Mon, 19 Sep 2022 22:50:35 +0800
> Wei Yongjun <weiyongjun1@huawei.com> wrote:
> 
>> On 2022/9/19 22:46, Lars-Peter Clausen wrote:
>>> On 9/19/22 16:59, Wei Yongjun wrote:  
>>>> From: Wei Yongjun <weiyongjun1@huawei.com>
> Hi Wei Yongjun,
> 
>>>>
>>>> Add spi_device_id entries to silent following SPI warnings:
> 
> silence rather than silent (also in patch titles)
> 
>>>>
>>>> SPI driver ad7124 has no spi_device_id for adi,ad7124-4
>>>> SPI driver ad7124 has no spi_device_id for adi,ad7124-8  
>>> What generates those warnings?
>>>   
>>
>> Commit 5fa6863ba692 ("spi: Check we have a spi_device_id for each DT
>> compatible") added a test to check that every SPI driver has a
>> spi_device_id for each DT compatiable string defined by the driver
>> and warns if the spi_device_id is missing.
> 
> When sending a series of similar fixes to a given subsystem together
> it's helpful to group them into a series, so that comments that
> apply series wide can easily be easily found.
> 
> A cover letter is also useful to provide a little more information on
> what is being fixed.


Sure, will update in v3.

Thanks.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] iio: adc: ad7124: Silent no spi_device_id warnings
  2022-09-19 15:55       ` Wei Yongjun
@ 2022-09-19 16:05         ` Jonathan Cameron
  0 siblings, 0 replies; 7+ messages in thread
From: Jonathan Cameron @ 2022-09-19 16:05 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: Lars-Peter Clausen, Wei Yongjun, Michael Hennerich, linux-iio

On Mon, 19 Sep 2022 23:55:56 +0800
Wei Yongjun <weiyongjun1@huawei.com> wrote:

> On 2022/9/19 23:53, Jonathan Cameron wrote:
> > On Mon, 19 Sep 2022 22:50:35 +0800
> > Wei Yongjun <weiyongjun1@huawei.com> wrote:
> >   
> >> On 2022/9/19 22:46, Lars-Peter Clausen wrote:  
> >>> On 9/19/22 16:59, Wei Yongjun wrote:    
> >>>> From: Wei Yongjun <weiyongjun1@huawei.com>  
> > Hi Wei Yongjun,
> >   
> >>>>
> >>>> Add spi_device_id entries to silent following SPI warnings:  
> > 
> > silence rather than silent (also in patch titles)
> >   
> >>>>
> >>>> SPI driver ad7124 has no spi_device_id for adi,ad7124-4
> >>>> SPI driver ad7124 has no spi_device_id for adi,ad7124-8    
> >>> What generates those warnings?
> >>>     
> >>
> >> Commit 5fa6863ba692 ("spi: Check we have a spi_device_id for each DT
> >> compatible") added a test to check that every SPI driver has a
> >> spi_device_id for each DT compatiable string defined by the driver
> >> and warns if the spi_device_id is missing.  
> > 
> > When sending a series of similar fixes to a given subsystem together
> > it's helpful to group them into a series, so that comments that
> > apply series wide can easily be easily found.
> > 
> > A cover letter is also useful to provide a little more information on
> > what is being fixed.  
> 
> 
> Sure, will update in v3.

On that note.  It's a good idea to let a patch series, even when simple,
sit for at least a few days before sending a new version.

As demonstrated here you run the risk of going through multiple rounds
just because reviews haven't come in yet!  Reviewers will often not
look at all at a series showing rapid version changes, because they take
the view it's not yet stable and it will be more productive to review it
once it is...

Jonathan

> 
> Thanks.
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-09-19 16:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-19 14:59 [PATCH] iio: adc: ad7124: Silent no spi_device_id warnings Wei Yongjun
2022-09-19 14:46 ` Lars-Peter Clausen
2022-09-19 14:50   ` Wei Yongjun
2022-09-19 15:53     ` Jonathan Cameron
2022-09-19 15:55       ` Wei Yongjun
2022-09-19 16:05         ` Jonathan Cameron
2022-09-19 14:50   ` Lars-Peter Clausen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox