public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Phil Carmody <ext-phil.2.carmody@nokia.com>
To: "ext Menon, Nishanth" <nm@ti.com>
Cc: "Guzman Lugo, Fernando" <x0095840@ti.com>,
	"Palande Ameya (Nokia-D/Helsinki)" <ameya.palande@nokia.com>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"Kanigeri, Hari" <h-kanigeri2@ti.com>
Subject: RE: [PATCH 1/4] DSPBRIDGE: Fix macros that break when inside an if/else
Date: Tue, 14 Jul 2009 14:20:30 +0300	[thread overview]
Message-ID: <1247570430.13580.16.camel@pcarmody-desktop> (raw)
In-Reply-To: <7A436F7769CA33409C6B44B358BFFF0C011E5ED158@dlee02.ent.ti.com>

On Tue, 2009-07-14 at 13:05 +0200, ext Menon, Nishanth wrote:
> Phil,
> > -----Original Message-----
> > From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> > owner@vger.kernel.org] On Behalf Of Phil Carmody
> > Sent: Tuesday, July 14, 2009 6:03 AM
> > 
> > On Fri, 2009-07-10 at 01:51 +0200, ext Guzman Lugo, Fernando wrote:
> > > Thanks for the patch, it only has indentation problems, this is the
> > checkpatch output:
> > >
> > > WARNING: suspect code indent for conditional statements (8, 12)
> > > #34: FILE: drivers/dsp/bridge/pmgr/wcd.c:152:
> > > +       if (DSP_SUCCEEDED(status)) {                    \
> > > +           if (unlikely((src) == NULL) ||              \
> > >
> > > WARNING: line over 80 characters
> > > #36: FILE: drivers/dsp/bridge/pmgr/wcd.c:154:
> > > +               unlikely(copy_from_user(dest, src, (elements) *
> > sizeof(*(dest))))) { \
> > >
> > > WARNING: suspect code indent for conditional statements (8, 12)
> > > #46: FILE: drivers/dsp/bridge/pmgr/wcd.c:164:
> > > +       if (DSP_SUCCEEDED(status)) {                    \
> > > +           if (unlikely((dest) == NULL) ||
> > \
> > >
> > > WARNING: line over 80 characters
> > > #48: FILE: drivers/dsp/bridge/pmgr/wcd.c:166:
> > > +               unlikely(copy_to_user(dest, src, (elements) *
> > sizeof(*(src))))) { \
> > >
> > > total: 0 errors, 4 warnings, 48 lines checked
> > >
> > > Could you please fix that warning please?
> > 
> > I suspect the only way to fix those warnings would either introduce
> > other warnings, or \
> Gentle query: Have we already tried this or is it just a suspicion?

Being an Englishman, I use various forms of irony more than others do;
that particular form's called "litotes". It indeed is not a suspicion -
I tried about 4 or 5 variations, none of which were both readable and
warning-free. In the end I decided that whatever was closest to the
original would be safest.

> > 							would \
> > 							lead \
> > 							to \
> > 							utterly \
> > 							unread- \
> > 							able \
> > 							code.
> > 
> > If you check how and why the original TI-originated version of the code
> > does not follow the linux coding standards, the difficulties we would
> > have making a warning-free patch of it should be apparent.
> 
> Past is past. The idea was not to introduce anymore warning code.

The TI code would trigger the following 4 warnings:
WARNING: suspect code indent for conditional statements (4, 12)
WARNING: line over 80 characters
WARNING: suspect code indent for conditional statements (4, 12)
WARNING: line over 80 characters
4 warnings isn't more than 4 warnings, it's no change - and as I mention
above, in the absence of an easy fix, that was deliberate.

Phil


  parent reply	other threads:[~2009-07-14 11:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-07 15:02 [PATCH 1/4] DSPBRIDGE: Fix macros that break when inside an if/else Ameya Palande
2009-07-07 15:02 ` [PATCHv2 2/4] DSPBRIDGE: Heuristic fixes of strlen/malloc out by one Ameya Palande
2009-07-07 15:02   ` [PATCHv2 3/4] DSPBRIDGE: PROCWRAP_Load function cleanup in a complete mess Ameya Palande
2009-07-07 15:02     ` [PATCH 4/4] DSPBRIDGE: Remove unnecessary conditions from some for loops Ameya Palande
2009-07-09 23:53       ` Guzman Lugo, Fernando
2009-07-09 23:58     ` [PATCHv2 3/4] DSPBRIDGE: PROCWRAP_Load function cleanup in a complete mess Guzman Lugo, Fernando
2009-07-13 12:35       ` [PATCHv3 " Ameya Palande
2009-07-09 23:52   ` [PATCHv2 2/4] DSPBRIDGE: Heuristic fixes of strlen/malloc out by one Guzman Lugo, Fernando
2009-07-09 23:51 ` [PATCH 1/4] DSPBRIDGE: Fix macros that break when inside an if/else Guzman Lugo, Fernando
2009-07-13 12:38   ` [PATCHv2 " Ameya Palande
2009-07-13 12:42     ` Ameya Palande
2009-07-14 11:02   ` [PATCH " Phil Carmody
2009-07-14 11:05     ` Menon, Nishanth
2009-07-14 11:17       ` Ameya Palande
2009-07-14 11:20       ` Phil Carmody [this message]
2009-07-14 12:30         ` Hiroshi DOYU
2009-07-14 13:17           ` Phil Carmody
2009-07-14 20:22             ` Hiroshi DOYU

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=1247570430.13580.16.camel@pcarmody-desktop \
    --to=ext-phil.2.carmody@nokia.com \
    --cc=ameya.palande@nokia.com \
    --cc=h-kanigeri2@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=x0095840@ti.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox