From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@linux.intel.com>,
wharms@bfs.de
Cc: dan.carpenter@oracle.com, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org, david.a.cohen@linux.intel.com
Subject: Re: [PATCH v3 3/3] intel-mid: Move boundry check to the start of init code
Date: Fri, 09 Sep 2016 11:30:44 +0000 [thread overview]
Message-ID: <1473420644.11323.128.camel@linux.intel.com> (raw)
In-Reply-To: <d1643b61f9d5b6fe7d1b168341d9b1e89696c43b.1473386382.git.sathyanarayanan.kuppuswamy@linux.intel.com>
On Thu, 2016-09-08 at 19:07 -0700, Kuppuswamy Sathyanarayanan wrote:
> Moved the instance boundary check to the start of the pcal9555a
> platform init code. This will prevent unnecessary initialization
> on instance boundary error.
I don't see how it makes any better.
I would drop this patch.
>
> Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@
> linux.intel.com>
> ---
> arch/x86/platform/intel-mid/device_libs/platform_pcal9555a.c | 12
> ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/x86/platform/intel-
> mid/device_libs/platform_pcal9555a.c b/arch/x86/platform/intel-
> mid/device_libs/platform_pcal9555a.c
> index cde764e..4e5dd95 100644
> --- a/arch/x86/platform/intel-mid/device_libs/platform_pcal9555a.c
> +++ b/arch/x86/platform/intel-mid/device_libs/platform_pcal9555a.c
> @@ -34,6 +34,12 @@ static void __init *pcal9555a_platform_data(void
> *info)
> char intr_pin_name[SFI_NAME_LEN + 1];
> int gpio_base, intr;
>
> + if (nr >= PCAL9555A_NUM) {
> + pr_err("%s: Too many instances, only %d supported\n",
> __func__,
> + PCAL9555A_NUM);
> + return ERR_PTR(-ENOMEM);
> + }
> +
> snprintf(base_pin_name, sizeof(base_pin_name), "%s_base",
> type);
> snprintf(intr_pin_name, sizeof(intr_pin_name), "%s_int",
> type);
>
> @@ -47,12 +53,6 @@ static void __init *pcal9555a_platform_data(void
> *info)
> return NULL;
> }
>
> - if (nr >= PCAL9555A_NUM) {
> - pr_err("%s: Too many instances, only %d supported\n",
> __func__,
> - PCAL9555A_NUM);
> - return ERR_PTR(-ENOMEM);
> - }
> -
> pcal9555a = &pcal9555a_pdata[nr++];
> pcal9555a->gpio_base = gpio_base;
>
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@linux.intel.com>,
wharms@bfs.de
Cc: dan.carpenter@oracle.com, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org, david.a.cohen@linux.intel.com
Subject: Re: [PATCH v3 3/3] intel-mid: Move boundry check to the start of init code
Date: Fri, 09 Sep 2016 14:30:44 +0300 [thread overview]
Message-ID: <1473420644.11323.128.camel@linux.intel.com> (raw)
In-Reply-To: <d1643b61f9d5b6fe7d1b168341d9b1e89696c43b.1473386382.git.sathyanarayanan.kuppuswamy@linux.intel.com>
On Thu, 2016-09-08 at 19:07 -0700, Kuppuswamy Sathyanarayanan wrote:
> Moved the instance boundary check to the start of the pcal9555a
> platform init code. This will prevent unnecessary initialization
> on instance boundary error.
I don't see how it makes any better.
I would drop this patch.
>
> Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@
> linux.intel.com>
> ---
> arch/x86/platform/intel-mid/device_libs/platform_pcal9555a.c | 12
> ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/x86/platform/intel-
> mid/device_libs/platform_pcal9555a.c b/arch/x86/platform/intel-
> mid/device_libs/platform_pcal9555a.c
> index cde764e..4e5dd95 100644
> --- a/arch/x86/platform/intel-mid/device_libs/platform_pcal9555a.c
> +++ b/arch/x86/platform/intel-mid/device_libs/platform_pcal9555a.c
> @@ -34,6 +34,12 @@ static void __init *pcal9555a_platform_data(void
> *info)
> char intr_pin_name[SFI_NAME_LEN + 1];
> int gpio_base, intr;
>
> + if (nr >= PCAL9555A_NUM) {
> + pr_err("%s: Too many instances, only %d supported\n",
> __func__,
> + PCAL9555A_NUM);
> + return ERR_PTR(-ENOMEM);
> + }
> +
> snprintf(base_pin_name, sizeof(base_pin_name), "%s_base",
> type);
> snprintf(intr_pin_name, sizeof(intr_pin_name), "%s_int",
> type);
>
> @@ -47,12 +53,6 @@ static void __init *pcal9555a_platform_data(void
> *info)
> return NULL;
> }
>
> - if (nr >= PCAL9555A_NUM) {
> - pr_err("%s: Too many instances, only %d supported\n",
> __func__,
> - PCAL9555A_NUM);
> - return ERR_PTR(-ENOMEM);
> - }
> -
> pcal9555a = &pcal9555a_pdata[nr++];
> pcal9555a->gpio_base = gpio_base;
>
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
next prev parent reply other threads:[~2016-09-09 11:30 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-15 19:23 [bug report] x86/sfi: Enable enumeration of SD devices Dan Carpenter
2016-08-09 15:32 ` Andy Shevchenko
2016-08-09 17:58 ` Dan Carpenter
2016-08-28 13:31 ` Andy Shevchenko
2016-08-29 20:59 ` Kuppuswamy, Sathyanarayanan
2016-08-30 9:46 ` Andy Shevchenko
2016-08-30 11:06 ` walter harms
2016-08-30 11:13 ` Andy Shevchenko
2016-08-30 18:18 ` Sathyanarayanan Kuppuswamy
2016-09-07 1:04 ` [PATCH 1/1] intel-mid: Fix sfi get_platform_data() return value issues Kuppuswamy Sathyanarayanan
2016-09-07 1:04 ` Kuppuswamy Sathyanarayanan
2016-09-07 12:15 ` Andy Shevchenko
2016-09-07 12:15 ` Andy Shevchenko
2016-09-08 0:04 ` sathyanarayanan kuppuswamy
2016-09-08 0:04 ` sathyanarayanan kuppuswamy
2016-09-08 9:49 ` Andy Shevchenko
2016-09-08 9:49 ` Andy Shevchenko
2016-09-08 0:05 ` [PATCH v2 " Kuppuswamy Sathyanarayanan
2016-09-08 0:05 ` Kuppuswamy Sathyanarayanan
2016-09-08 12:51 ` Andy Shevchenko
2016-09-08 12:51 ` Andy Shevchenko
2016-09-08 22:41 ` sathyanarayanan kuppuswamy
2016-09-08 22:41 ` sathyanarayanan kuppuswamy
2016-09-09 11:20 ` Andy Shevchenko
2016-09-09 11:20 ` Andy Shevchenko
2016-09-09 2:07 ` [PATCH v3 1/3] " Kuppuswamy Sathyanarayanan
2016-09-09 2:07 ` Kuppuswamy Sathyanarayanan
2016-09-09 2:07 ` [PATCH v3 2/3] intel-mid: Add valid error messages on init failure Kuppuswamy Sathyanarayanan
2016-09-09 2:07 ` Kuppuswamy Sathyanarayanan
2016-09-09 11:27 ` Andy Shevchenko
2016-09-09 11:27 ` Andy Shevchenko
2016-09-09 2:07 ` [PATCH v3 3/3] intel-mid: Move boundry check to the start of init code Kuppuswamy Sathyanarayanan
2016-09-09 2:07 ` Kuppuswamy Sathyanarayanan
2016-09-09 11:30 ` Andy Shevchenko [this message]
2016-09-09 11:30 ` Andy Shevchenko
2016-09-01 13:17 ` [bug report] x86/sfi: Enable enumeration of SD devices Andy Shevchenko
2016-09-07 0:51 ` Sathyanarayanan Kuppuswamy
2016-09-07 12:00 ` Andy Shevchenko
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=1473420644.11323.128.camel@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=dan.carpenter@oracle.com \
--cc=david.a.cohen@linux.intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=wharms@bfs.de \
/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.