From: Heiner Kallweit <hkallweit1@gmail.com>
To: Andi Shyti <andi.shyti@kernel.org>
Cc: Jean Delvare <jdelvare@suse.com>,
"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>
Subject: Re: [PATCH v2] i2c: i801: Fix missing Kconfig dependency
Date: Sat, 6 Apr 2024 21:52:38 +0200 [thread overview]
Message-ID: <32f71a94-1997-486f-905c-90d3cee2370c@gmail.com> (raw)
In-Reply-To: <ilxot5cgzlivhmxpuiifpnyx3jxymlxy2avnkqjgfzcgmmk3wd@glnv7nlydz56>
On 06.04.2024 02:29, Andi Shyti wrote:
> Hi Heiner,
>
> On Fri, Apr 05, 2024 at 07:57:24AM +0200, Heiner Kallweit wrote:
>> On 05.04.2024 02:54, Andi Shyti wrote:
>>> Hi Heiner,
>>>
>>> first of all, thanks for the fast reaction!
>>>
>>> On Thu, Apr 04, 2024 at 10:09:50PM +0200, Heiner Kallweit wrote:
>>>> The original change adds usage of i2c_root_adapter(), which is
>>>> implemented in i2c-mux.c. Therefore we can't use the multiplexing
>>>> if I2C_I801=y and I2C_MUX=m.
>>>
>>> What is wrong with select I2C_MUX?
>>>
>> It would solve the issue, but:
>> We would uselessly enable I2C_MUX also if I2C_MUX_GPIO or DMI are disabled.
>> W/o them the mux part in i801 is a no-op. The call to i2c_root_adapter()
>> is in a conditionally compiled code part, controlled by:
>>
>> #if IS_ENABLED(CONFIG_I2C_MUX_GPIO) && defined CONFIG_DMI
>>
>>> And is this covering all the cases?
>>>
>> yes
>>
>>> Last thing, how have you tested and reproduced the issue?
>>>
>> The CI bot report included a link to the kernel config. So it was easy
>> to understand the root cause of the issue. I could reproduce it by setting:
>> I2C_I801=y
>> I2C_MUX=m
>> I2C_MUX_GPIO=m
>> This config was also used to test the fix.
>>
>> Underlying reason for the issue is that i801 has a code dependency on i2c_mux,
>> but not on i2c_mux_gpio.
>
> Even though it might look trivial, I need to reproduce the issue
> first and check the various cases.
>
> Because I'm not at home and, anyway, the report has come late in
> the week, I can queue this up in the next week's pull request.
>
> I'm not extremely happy with the new _CONFIG but I understand the
> reason behind it.
>
Whether an additional config symbol or an equivalent expression for conditional
compiling is better may be a matter of personal taste. I had a similar issue
in r8169 and followed the suggestion to put the logic to a new config symbol.
a2634a5ffcaf ("r8169: fix building with CONFIG_LEDS_CLASS=m")
Therefore I went the same way here.
Sometimes I encounter concerns when using macros like IS_REACHABLE().
> Thanks,
> Andi
>
Heiner
>>> Thanks,
>>> Andi
>>>
>> Heiner
>>
>>>> Handling the dependencies in the code would become unnecessarily
>>>> complex, therefore create a new config symbol.
>>>>
>>>> Fixes: 71b494e043d2 ("i2c: i801: Call i2c_register_spd for muxed child segments")
>>>> Reported-by: kernel test robot <lkp@intel.com>
>>>> Closes: https://lore.kernel.org/oe-kbuild-all/202404042206.MjAQC32x-lkp@intel.com/
>>>> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
>>
next prev parent reply other threads:[~2024-04-06 19:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-04 20:09 [PATCH v2] i2c: i801: Fix missing Kconfig dependency Heiner Kallweit
2024-04-05 0:54 ` Andi Shyti
2024-04-05 5:57 ` Heiner Kallweit
2024-04-06 0:29 ` Andi Shyti
2024-04-06 19:52 ` Heiner Kallweit [this message]
2024-04-07 18:34 ` Heiner Kallweit
2024-04-08 7:42 ` Wolfram Sang
2024-04-08 9:43 ` Heiner Kallweit
2024-04-11 1:22 ` Andi Shyti
2024-04-11 6:44 ` Wolfram Sang
2024-04-11 9:56 ` Andi Shyti
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=32f71a94-1997-486f-905c-90d3cee2370c@gmail.com \
--to=hkallweit1@gmail.com \
--cc=andi.shyti@kernel.org \
--cc=jdelvare@suse.com \
--cc=linux-i2c@vger.kernel.org \
/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