Message ID | 20220919145945.823327-1-weiyongjun@huaweicloud.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | iio: adc: ad7124: Silent no spi_device_id warnings | expand |
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?
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
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.
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
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.
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. >
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);