Fw: devel Digest, Vol 57, Issue 175

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



yollama e mailini yeter...
Send devel mailing list submissions to
devel@xxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxx
You can reach the person managing the list at
devel-owner@xxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxx> (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@xxxxxx>
To: vamsi prasanth <vamsiprasanth@xxxxxxxxx>
Cc: devel@xxxxxxxxxxxxxxxxxxxx, gregkh@xxxxxxxxxxxxxxxxxxx
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@xxxxxxxxx>
Message-ID: <20120524102740.GB15990@xxxxxxxxxx>
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@xxxxxxxxxx>
To: Ian Abbott <abbotti@xxxxxxxxx>
Cc: devel@xxxxxxxxxxxxxxxxxxxx, Mori Hess
<fmhess@xxxxxxxxxxxxxxxxxxxxx>, kernel-janitors@xxxxxxxxxxxxxxx, Greg
Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Subject: [patch] staging: comedi: cleanup comedi_recognize()
Message-ID: <20120524102851.GA4399@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@xxxxxxxxxx>
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@xxxxxxxxx>
To: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Cc: "devel@xxxxxxxxxxxxxxxxxxxx" <devel@xxxxxxxxxxxxxxxxxxxx>, Mori
Hess <fmhess@xxxxxxxxxxxxxxxxxxxxx>, Ian Abbott
<ian.abbott@xxxxxxxxx>, Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx>, "kernel-janitors@xxxxxxxxxxxxxxx"
<kernel-janitors@xxxxxxxxxxxxxxx>
Subject: Re: [patch] staging: comedi: cleanup comedi_recognize()
Message-ID: <4FBE1428.30909@xxxxxxxxx>
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@xxxxxxxxxx>

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@xxxxxxxxx>        )=-
-=( 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@xxxxxxxxxx>
To: Ian Abbott <abbotti@xxxxxxxxx>
Cc: "devel@xxxxxxxxxxxxxxxxxxxx" <devel@xxxxxxxxxxxxxxxxxxxx>, Mori
Hess <fmhess@xxxxxxxxxxxxxxxxxxxxx>, Ian Abbott
<ian.abbott@xxxxxxxxx>, Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx>, "kernel-janitors@xxxxxxxxxxxxxxx"
<kernel-janitors@xxxxxxxxxxxxxxx>
Subject: Re: [patch] staging: comedi: cleanup comedi_recognize()
Message-ID: <20120524111601.GS4629@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@xxxxxxxxxx>
>
>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@xxxxxxxxx>
To: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Cc: "devel@xxxxxxxxxxxxxxxxxxxx" <devel@xxxxxxxxxxxxxxxxxxxx>, Mori
Hess <fmhess@xxxxxxxxxxxxxxxxxxxxx>, Ian Abbott
<ian.abbott@xxxxxxxxx>, Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx>, "kernel-janitors@xxxxxxxxxxxxxxx"
<kernel-janitors@xxxxxxxxxxxxxxx>
Subject: Re: [patch] staging: comedi: cleanup comedi_recognize()
Message-ID: <4FBE18D1.8060405@xxxxxxxxx>
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@xxxxxxxxxx>

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@xxxxxxxxx>        )=-
-=( 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@xxxxxxxxx>
To: Ian Abbott <ian.abbott@xxxxxxxxx>
Cc: "devel@xxxxxxxxxxxxxxxxxxxxxx" <devel@xxxxxxxxxxxxxxxxxxxxxx>,
Bernd Porr <berndporr@xxxxxxx>, Frank Mori Hess
<fmhess@xxxxxxxxxxxxxxxxxxxxx>, Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH 1/9] staging: comedi: das08: Use IS_ENABLED()
Message-ID: <4FBE1E68.3000507@xxxxxxxxx>
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@xxxxxxxxx>        )=-
-=( 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@xxxxxxxxx>
To: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Cc: devel@xxxxxxxxxxxxxxxxxxxxxx, gregkh@xxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset=ISO-8859-1
On Thu, May 24, 2012 at 2:17 AM, Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
On Wed, May 23, 2012 at 11:16:29PM -0400, klmckinney1@xxxxxxxxx wrote:
From: Kevin McKinney <klmckinney1@xxxxxxxxx>

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@xxxxxxxxxxx>
To: undisclosed-recipients:;
Subject: Invitation to Global Fair 2012
Message-ID: <20120523234714.DCE987A1AEC@xxxxxxxxxxx>
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@xxxxxxxxxxxxxxxxxxxx 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@xxxxxxxxxxxxxxxxxxxx
------------------------------
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
End of devel Digest, Vol 57, Issue 175
**************************************
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux