All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: Jean Delvare <jdelvare@suse.de>, Heiner Kallweit <hkallweit1@gmail.com>
Cc: linux-i2c@vger.kernel.org
Subject: Re: [PATCH] 2c: i801: Improve handling of chip-specific feature definitions
Date: Thu, 18 Nov 2021 16:03:39 +0200	[thread overview]
Message-ID: <56d37e6a-a0c0-861b-dfd7-e50b95cd5377@linux.intel.com> (raw)
In-Reply-To: <20211118110912.76b74cd3@endymion>

On 11/18/21 12:09 PM, Jean Delvare wrote:
> Hi Heiner,
> 
> On Mon, 08 Nov 2021 21:10:12 +0100, Heiner Kallweit wrote:
>> Reduce source code and code size by defining the chip features
>> statically.
> 
> While I don't like the PCI_DEVICE_DATA macro implementation (for it
> breaks grepping for PCI defines), I generally enjoy more data and less
> code. So I am fine with this change.
> 
> Jarkko, you are typically the one adding support for new devices to
> this driver so this change will affect you. Are you OK with that change?
> 
I think it makes code more readable and less error prone when adding 
support for new devices and merging with other upstream changes. I 
remember one such accident:

fd4b204a0971 ("i2c: i801: Bring back Block Process Call support for 
certain platforms")

>> +#define DEF_FEATURES	(FEATURE_BLOCK_PROC | FEATURE_I2C_BLOCK_READ	| \
> 
> Not a good name ("default" isn't descriptive) and not consistent
> either. I suggest "FEATURES_82801EB" instead, as this is the first
> chipset which supported all these features. And you can make the
> definitions of FEATURES_82801DB and FEATURES_82801EB consistent
> (spacing/alignment).
> 
How about calling default as FEATURES_ICH5 and 82801DB as FEATURES_ICH4? 
That makes easier to follow comments like "/* ICH4 and later */" in the 
code.

Jarkko

  reply	other threads:[~2021-11-18 14:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-08 20:10 [PATCH] 2c: i801: Improve handling of chip-specific feature definitions Heiner Kallweit
2021-11-18 10:09 ` Jean Delvare
2021-11-18 14:03   ` Jarkko Nikula [this message]
2021-11-18 15:14     ` Jean Delvare
2021-11-18 15:16       ` Heiner Kallweit
2021-11-18 10:11 ` Jean Delvare

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=56d37e6a-a0c0-861b-dfd7-e50b95cd5377@linux.intel.com \
    --to=jarkko.nikula@linux.intel.com \
    --cc=hkallweit1@gmail.com \
    --cc=jdelvare@suse.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.