Fw: devel Digest, Vol 57, Issue 175

salih duranoğlu s.duranoglu at hotmail.com
Thu May 24 13:18:27 UTC 2012


yollama e mailini yeter...
Send devel mailing list submissions to
devel at linuxdriverproject.org
To subscribe or unsubscribe via the World Wide Web, visit
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
or, via email, send a message with subject or body 'help' to
devel-request at linuxdriverproject.org
You can reach the person managing the list at
devel-owner at linuxdriverproject.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of devel digest..."
Today's Topics:
   1. Re: [PATCH 1/2] Staging:winbond: Fix coding style issues in
      wb35tx.c This is a patch in wb35tx.c where spacing issues,
      unwanted braces & parenthesis,column width restrictions have all
      been fixed found by checkpatch.pl tool Signed-off-by: Vamsi
      Prasanth <vamsiprasanth at gmail.com> (Pavel Machek)
   2. [patch] staging: comedi: cleanup comedi_recognize()
      (Dan Carpenter)
   3. Re: [patch] staging: comedi: cleanup comedi_recognize()
      (Ian Abbott)
   4. Re: [patch] staging: comedi: cleanup comedi_recognize()
      (Dan Carpenter)
   5. Re: [patch] staging: comedi: cleanup comedi_recognize()
      (Ian Abbott)
   6. Re: [PATCH 1/9] staging: comedi: das08: Use IS_ENABLED()
      (Ian Abbott)
   7. Re: [PATCH 1/2] Staging: bcm: Add typedef back for
      bcm_ip_address, and convert struct back to union. (Kevin McKinney)
   8. Invitation to Global Fair 2012 (Conference Coordinator)
----------------------------------------------------------------------
Message: 1
Date: Thu, 24 May 2012 12:27:40 +0200
From: Pavel Machek <pavel at ucw.cz>
To: vamsi prasanth <vamsiprasanth at gmail.com>
Cc: devel at driverdev.osuosl.org, gregkh at linuxfoundation.org
Subject: Re: [PATCH 1/2] Staging:winbond: Fix coding style issues in
wb35tx.c This is a patch in wb35tx.c where spacing issues, unwanted
braces & parenthesis,column width restrictions have all been fixed
found by checkpatch.pl tool Signed-off-by: Vamsi Prasanth
<vamsiprasanth at gmail.com>
Message-ID: <20120524102740.GB15990 at elf.ucw.cz>
Content-Type: text/plain; charset=us-ascii
On Sat 2012-05-19 21:25:08, vamsi prasanth wrote:
> ---
>  drivers/staging/winbond/wb35tx.c |   63 
> +++++++++++++++++++-------------------
>  1 file changed, 31 insertions(+), 32 deletions(-)
ACK.
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
------------------------------
Message: 2
Date: Thu, 24 May 2012 13:28:51 +0300
From: Dan Carpenter <dan.carpenter at oracle.com>
To: Ian Abbott <abbotti at mev.co.uk>
Cc: devel at driverdev.osuosl.org, Mori Hess
<fmhess at users.sourceforge.net>, kernel-janitors at vger.kernel.org, Greg
Kroah-Hartman <gregkh at linuxfoundation.org>
Subject: [patch] staging: comedi: cleanup comedi_recognize()
Message-ID: <20120524102851.GA4399 at elgon.mountain>
Content-Type: text/plain; charset=us-ascii
This function is more complicated than it needs to be because of the
consts.  It's not worth saving them because we drop the consts anyway
when we return (void *)name_ptr.
Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
diff --git a/drivers/staging/comedi/drivers.c 
b/drivers/staging/comedi/drivers.c
index 1c3d638..a8f576d 100644
--- a/drivers/staging/comedi/drivers.c
+++ b/drivers/staging/comedi/drivers.c
@@ -304,14 +304,13 @@ static int postconfig(struct comedi_device *dev)
  * that register their supported board names */
static void *comedi_recognize(struct comedi_driver *driv, const char *name)
{
- unsigned i;
- const char *const *name_ptr = driv->board_name;
+ char **name_ptr = (char **)driv->board_name;
+ int i;
+
  for (i = 0; i < driv->num_names; i++) {
  if (strcmp(*name_ptr, name) == 0)
- return (void *)name_ptr;
- name_ptr =
-     (const char *const *)((const char *)name_ptr +
-   driv->offset);
+ return name_ptr;
+ name_ptr = (char **)((void *)name_ptr + driv->offset);
  }
  return NULL;
------------------------------
Message: 3
Date: Thu, 24 May 2012 11:57:44 +0100
From: Ian Abbott <abbotti at mev.co.uk>
To: Dan Carpenter <dan.carpenter at oracle.com>
Cc: "devel at driverdev.osuosl.org" <devel at driverdev.osuosl.org>, Mori
Hess <fmhess at users.sourceforge.net>, Ian Abbott
<ian.abbott at mev.co.uk>, Greg Kroah-Hartman
<gregkh at linuxfoundation.org>, "kernel-janitors at vger.kernel.org"
<kernel-janitors at vger.kernel.org>
Subject: Re: [patch] staging: comedi: cleanup comedi_recognize()
Message-ID: <4FBE1428.30909 at mev.co.uk>
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
On 2012-05-24 11:28, Dan Carpenter wrote:
> This function is more complicated than it needs to be because of the
> consts.  It's not worth saving them because we drop the consts anyway
> when we return (void *)name_ptr.
>
> Signed-off-by: Dan Carpenter<dan.carpenter at oracle.com>
>
> diff --git a/drivers/staging/comedi/drivers.c 
> b/drivers/staging/comedi/drivers.c
> index 1c3d638..a8f576d 100644
> --- a/drivers/staging/comedi/drivers.c
> +++ b/drivers/staging/comedi/drivers.c
> @@ -304,14 +304,13 @@ static int postconfig(struct comedi_device *dev)
>    * that register their supported board names */
>   static void *comedi_recognize(struct comedi_driver *driv, const char 
> *name)
>   {
> - unsigned i;
> - const char *const *name_ptr = driv->board_name;
> + char **name_ptr = (char **)driv->board_name;
> + int i;
> +
>   for (i = 0; i<  driv->num_names; i++) {
>   if (strcmp(*name_ptr, name) == 0)
> - return (void *)name_ptr;
> - name_ptr =
> -     (const char *const *)((const char *)name_ptr +
> -   driv->offset);
> + return name_ptr;
> + name_ptr = (char **)((void *)name_ptr + driv->offset);
>   }
>
>   return NULL;
You could simplify it further by keeping one of the consts:
static void *comedi_recognize(struct comedi_driver *driv, const char *name)
{
unsigned i;
const char **name_ptr = driv->board_name;
for (i = 0; i < driv->num_names; i++) {
if (strcmp(*name_ptr, name) == 0)
return name_ptr;
name_ptr = (void *)name_ptr + driv->offset;
}
return NULL;
}
-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti at mev.co.uk>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-
------------------------------
Message: 4
Date: Thu, 24 May 2012 14:16:01 +0300
From: Dan Carpenter <dan.carpenter at oracle.com>
To: Ian Abbott <abbotti at mev.co.uk>
Cc: "devel at driverdev.osuosl.org" <devel at driverdev.osuosl.org>, Mori
Hess <fmhess at users.sourceforge.net>, Ian Abbott
<ian.abbott at mev.co.uk>, Greg Kroah-Hartman
<gregkh at linuxfoundation.org>, "kernel-janitors at vger.kernel.org"
<kernel-janitors at vger.kernel.org>
Subject: Re: [patch] staging: comedi: cleanup comedi_recognize()
Message-ID: <20120524111601.GS4629 at mwanda>
Content-Type: text/plain; charset=us-ascii
On Thu, May 24, 2012 at 11:57:44AM +0100, Ian Abbott wrote:
> On 2012-05-24 11:28, Dan Carpenter wrote:
> >This function is more complicated than it needs to be because of the
> >consts.  It's not worth saving them because we drop the consts anyway
> >when we return (void *)name_ptr.
> >
> >Signed-off-by: Dan Carpenter<dan.carpenter at oracle.com>
> >
> >diff --git a/drivers/staging/comedi/drivers.c 
> >b/drivers/staging/comedi/drivers.c
> >index 1c3d638..a8f576d 100644
> >--- a/drivers/staging/comedi/drivers.c
> >+++ b/drivers/staging/comedi/drivers.c
> >@@ -304,14 +304,13 @@ static int postconfig(struct comedi_device *dev)
> >   * that register their supported board names */
> >  static void *comedi_recognize(struct comedi_driver *driv, const char 
> > *name)
> >  {
> >- unsigned i;
> >- const char *const *name_ptr = driv->board_name;
> >+ char **name_ptr = (char **)driv->board_name;
> >+ int i;
> >+
> >  for (i = 0; i<  driv->num_names; i++) {
> >  if (strcmp(*name_ptr, name) == 0)
> >- return (void *)name_ptr;
> >- name_ptr =
> >-     (const char *const *)((const char *)name_ptr +
> >-   driv->offset);
> >+ return name_ptr;
> >+ name_ptr = (char **)((void *)name_ptr + driv->offset);
> >  }
> >
> >  return NULL;
>
> You could simplify it further by keeping one of the consts:
>
> static void *comedi_recognize(struct comedi_driver *driv, const char 
> *name)
> {
> unsigned i;
> const char **name_ptr = driv->board_name;
> for (i = 0; i < driv->num_names; i++) {
> if (strcmp(*name_ptr, name) == 0)
> return name_ptr;
> name_ptr = (void *)name_ptr + driv->offset;
> }
> return NULL;
> }
Sure.  I'll resend.
regards,
dan carpenter
------------------------------
Message: 5
Date: Thu, 24 May 2012 12:17:37 +0100
From: Ian Abbott <abbotti at mev.co.uk>
To: Dan Carpenter <dan.carpenter at oracle.com>
Cc: "devel at driverdev.osuosl.org" <devel at driverdev.osuosl.org>, Mori
Hess <fmhess at users.sourceforge.net>, Ian Abbott
<ian.abbott at mev.co.uk>, Greg Kroah-Hartman
<gregkh at linuxfoundation.org>, "kernel-janitors at vger.kernel.org"
<kernel-janitors at vger.kernel.org>
Subject: Re: [patch] staging: comedi: cleanup comedi_recognize()
Message-ID: <4FBE18D1.8060405 at mev.co.uk>
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
On 2012-05-24 12:16, Dan Carpenter wrote:
> On Thu, May 24, 2012 at 11:57:44AM +0100, Ian Abbott wrote:
>> On 2012-05-24 11:28, Dan Carpenter wrote:
>>> This function is more complicated than it needs to be because of the
>>> consts.  It's not worth saving them because we drop the consts anyway
>>> when we return (void *)name_ptr.
>>>
>>> Signed-off-by: Dan Carpenter<dan.carpenter at oracle.com>
>>>
>>> diff --git a/drivers/staging/comedi/drivers.c 
>>> b/drivers/staging/comedi/drivers.c
>>> index 1c3d638..a8f576d 100644
>>> --- a/drivers/staging/comedi/drivers.c
>>> +++ b/drivers/staging/comedi/drivers.c
>>> @@ -304,14 +304,13 @@ static int postconfig(struct comedi_device *dev)
>>>    * that register their supported board names */
>>>   static void *comedi_recognize(struct comedi_driver *driv, const char 
>>> *name)
>>>   {
>>> - unsigned i;
>>> - const char *const *name_ptr = driv->board_name;
>>> + char **name_ptr = (char **)driv->board_name;
>>> + int i;
>>> +
>>>   for (i = 0; i<   driv->num_names; i++) {
>>>   if (strcmp(*name_ptr, name) == 0)
>>> - return (void *)name_ptr;
>>> - name_ptr =
>>> -     (const char *const *)((const char *)name_ptr +
>>> -   driv->offset);
>>> + return name_ptr;
>>> + name_ptr = (char **)((void *)name_ptr + driv->offset);
>>>   }
>>>
>>>   return NULL;
>>
>> You could simplify it further by keeping one of the consts:
>>
>> static void *comedi_recognize(struct comedi_driver *driv, const char 
>> *name)
>> {
>> unsigned i;
>> const char **name_ptr = driv->board_name;
>> for (i = 0; i<  driv->num_names; i++) {
>> if (strcmp(*name_ptr, name) == 0)
>> return name_ptr;
>> name_ptr = (void *)name_ptr + driv->offset;
>> }
>> return NULL;
>> }
>
> Sure.  I'll resend.
Actually, my version gives a warning about a dropped qualifier, so the
initializer of name_ptr would need a cast after all.  You could keep
your version but remove the casts from (void *) when converting to the
other pointer types.
static void *comedi_recognize(struct comedi_driver *driv, const char *name)
{
unsigned i;
char **name_ptr = (char **)driv->board_name;
for (i = 0; i < driv->num_names; i++) {
if (strcmp(*name_ptr, name) == 0)
return name_ptr;
name_ptr = (void *)name_ptr + driv->offset;
}
return NULL;
}
-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti at mev.co.uk>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-
------------------------------
Message: 6
Date: Thu, 24 May 2012 12:41:28 +0100
From: Ian Abbott <abbotti at mev.co.uk>
To: Ian Abbott <ian.abbott at mev.co.uk>
Cc: "devel at linuxdriverproject.org" <devel at linuxdriverproject.org>,
Bernd Porr <berndporr at f2s.com>, Frank Mori Hess
<fmhess at users.sourceforge.net>, Greg Kroah-Hartman
<gregkh at linuxfoundation.org>
Subject: Re: [PATCH 1/9] staging: comedi: das08: Use IS_ENABLED()
Message-ID: <4FBE1E68.3000507 at mev.co.uk>
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Please ignore this set of 9 patches.  I'll post a new set addressing the
various concerns.
-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti at mev.co.uk>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-
------------------------------
Message: 7
Date: Thu, 24 May 2012 09:10:51 -0400
From: Kevin McKinney <klmckinney1 at gmail.com>
To: Dan Carpenter <dan.carpenter at oracle.com>
Cc: devel at linuxdriverproject.org, gregkh at linuxfoundation.org
Subject: Re: [PATCH 1/2] Staging: bcm: Add typedef back for
bcm_ip_address, and convert struct back to union.
Message-ID:
<CAKPrQY-K2Z2q61sG-d32-cR6iLwgL7-w8A75UUSC_g13sEFzvg at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
On Thu, May 24, 2012 at 2:17 AM, Dan Carpenter <dan.carpenter at oracle.com> 
wrote:
> On Wed, May 23, 2012 at 11:16:29PM -0400, klmckinney1 at gmail.com wrote:
>> From: Kevin McKinney <klmckinney1 at gmail.com>
>>
>> This patch adds typedef back for bcm_ip_address
>> and convert the struct back to union. All calls
>> to the struct are changed to call the typedef.
>>
>
> Sorry for the confusion, but this one can't be done in a separate
> patch. ?We can't apply that first patch.
> Subject: [PATCH 13/21] Staging: bcm: Remove typedef for _U_IP_ADDRESS and 
> convert union to struct.
No problem.  I will just resubmit the entire patch set and correct
these two issues.
Thanks,
Kevin
------------------------------
Message: 8
Date: Thu, 24 May 2012 00:47:10 +0100
From: "Conference Coordinator"<info at yommy.co.cc>
To: undisclosed-recipients:;
Subject: Invitation to Global Fair 2012
Message-ID: <20120523234714.DCE987A1AEC at yommy.co.cc>
Content-Type: text/plain; charset="Windows-1251"
Invitation to Global Fair 2012
Dear Participants,
I am please to invite you to the Africa Global Fair 2012 - Exhibition & 
Conference on 28 - 30 August 2012
in KL Convention Centre (KLCC), Kuala Lumpur, Malaysia. I am sure this 
Exhibition and Conference will
be a vital interface between both Africa and the rest of the World. There 
will be strong delegations and
exhibitions from a number of business sectors such as agriculture, banking, 
construction and energy to
manufacturing, mining, real estate and venture capital. The event will 
feature networking sessions,
giving delegates, exhibitioners and visitors the opportunity to discuss 
agreements, as well as providing
one-on-one meetings to facilitate business deals. Africa is brimming with 
investment opportunity.
Register now to take part in this exclusive opportunity as exhibitor or as 
conference delegate - to take
your money-making potential to greater heights.
To register click >>: www.AfricaGlobalFair.com  or email: 
info at africaglobalfair.com
The Event features high profile speakers including professionals, business 
leaders, decision makers,
political leaders and government officials. ( 
http://www.africaglobalfair.com/media.htm )
I look forward to meet you personally in Africa Global Fair 2012.
Yours Sincerely,
B. Dunni Sr,
Managing Partner
AfricaGlobalFair.com
To unsubscribe from future mailings, email: info at africaglobalfair.com
------------------------------
_______________________________________________
devel mailing list
devel at linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
End of devel Digest, Vol 57, Issue 175
************************************** 




More information about the devel mailing list