All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Cohen <david.a.cohen@linux.intel.com>
To: Joe Perches <joe@perches.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
	tglx@linutronix.de, Ingo Molnar <mingo@kernel.org>,
	linux-kernel@vger.kernel.org, x86@kernel.org,
	platform-driver-x86@vger.kernel.org,
	Kuppuswamy Sathyanarayanan
	<sathyanarayanan.kuppuswamy@linux.intel.com>
Subject: Re: [PATCH v3 07/10] intel_mid: Added custom device_handler support
Date: Mon, 14 Oct 2013 09:32:59 -0700	[thread overview]
Message-ID: <525C1CBB.9030708@linux.intel.com> (raw)
In-Reply-To: <1381767415.25528.10.camel@joe-AO722>

On 10/14/2013 09:16 AM, Joe Perches wrote:
> On Mon, 2013-10-14 at 09:03 -0700, H. Peter Anvin wrote:
>> On 10/11/2013 08:43 PM, David Cohen wrote:
>>>
>>>   	/* MSIC subdevices */
>>> -	{"msic_battery", SFI_DEV_TYPE_IPC, 1, &msic_battery_platform_data},
>>> -	{"msic_gpio", SFI_DEV_TYPE_IPC, 1, &msic_gpio_platform_data},
>>> -	{"msic_audio", SFI_DEV_TYPE_IPC, 1, &msic_audio_platform_data},
>>> -	{"msic_power_btn", SFI_DEV_TYPE_IPC, 1, &msic_power_btn_platform_data},
>>> -	{"msic_ocd", SFI_DEV_TYPE_IPC, 1, &msic_ocd_platform_data},
>>> -	{"msic_thermal", SFI_DEV_TYPE_IPC, 1, &msic_thermal_platform_data},
>>> -
>>> +	{"msic_battery", SFI_DEV_TYPE_IPC, 1, &msic_battery_platform_data,
>>> +					NULL},
>>> +	{"msic_gpio", SFI_DEV_TYPE_IPC, 1, &msic_gpio_platform_data, NULL},
>>> +	{"msic_audio", SFI_DEV_TYPE_IPC, 1, &msic_audio_platform_data, NULL},
>>> +	{"msic_power_btn", SFI_DEV_TYPE_IPC, 1, &msic_power_btn_platform_data,
>>> +					NULL},
>>> +	{"msic_ocd", SFI_DEV_TYPE_IPC, 1, &msic_ocd_platform_data, NULL},
>>> +	{"msic_thermal", SFI_DEV_TYPE_IPC, 1, &msic_thermal_platform_data,
>>> +					NULL},
>>>   	{},
>>>   };
>>>
>>
>> For highly regular arrays like this it is better to keep each line a
>> single line even if it gets a bit too long rather than randomly breaking
>> them.  The alternative is to put every field of every entry on a
>> separate line, but I don't think that is necessary called for here.
>
> True.
>
> Another option is to #define YA macro to produce the
> SFI_DEV_TYPE_IPC, 1, ... NULL that's common to all of them.

Thanks for your feedback. The parameters happen to be similar at this
time, but they won't be after next patches. I believe a macro could 
remove only prefix 'SFI_DEV_TYPE_' and suffix '_platform_data', which
seems enough to reduce line size.

I'll change it in new patch set.

Br, David Cohen

  parent reply	other threads:[~2013-10-14 16:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-12  3:43 [PATCH v3 00/10] rework arch/x86/platform/[mrst => intel-mid] David Cohen
2013-10-12  3:43 ` [PATCH v3 01/10] mrst: Fixed printk/pr_* related issues David Cohen
2013-10-12  3:43 ` [PATCH v3 02/10] mrst: Fixed indentation issues David Cohen
2013-10-12  3:43 ` [PATCH v3 03/10] mrst: Fixed checkpatch warnings David Cohen
2013-10-12  3:43 ` [PATCH v3 04/10] intel_mid: Renamed *mrst* to *intel_mid* David Cohen
2013-10-12  3:43 ` [PATCH v3 05/10] " David Cohen
2013-10-12  3:43 ` [PATCH v3 06/10] intel_mid: Refactored sfi_parse_devs() function David Cohen
2013-10-12  3:43 ` [PATCH v3 07/10] intel_mid: Added custom device_handler support David Cohen
2013-10-14 16:03   ` H. Peter Anvin
2013-10-14 16:16     ` Joe Perches
2013-10-14 16:30       ` H. Peter Anvin
2013-10-14 16:32       ` David Cohen [this message]
2013-10-14 16:30         ` H. Peter Anvin
2013-10-14 16:40           ` David Cohen
2013-10-12  3:43 ` [PATCH v3 08/10] intel_mid: Added custom handler for ipc devices David Cohen
2013-10-14 16:04   ` H. Peter Anvin
2013-10-14 16:33     ` David Cohen
2013-10-12  3:43 ` [PATCH v3 09/10] intel_mid: Moved board related code to a new file David Cohen
2013-10-12  3:43 ` [PATCH v3 10/10] intel_mid: Moved SFI related code to intel_mid_sfi.c David Cohen
2013-10-14 16:38   ` H. Peter Anvin
2013-10-14 16:47     ` David Cohen

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=525C1CBB.9030708@linux.intel.com \
    --to=david.a.cohen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=tglx@linutronix.de \
    --cc=x86@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.