public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [patch] staging: comedi: gsc_hpdi plx9080: Resolve sparse "different base types" warnings.
Date: Fri, 02 Aug 2013 14:39:59 +0000	[thread overview]
Message-ID: <20130802143959.GG5102@mwanda> (raw)
In-Reply-To: <201308011744.r71HiFtV077932@rivendell.pollux.laing>

On Fri, Aug 02, 2013 at 07:11:17AM -0600, Shaun Laing wrote:
> Thank you, Dan.
> 
> > It feels like the ->dma_desc buffer is supposed to go to be used
> > by the hardware but I don't see where that happens.  This driver
> > looks like complete garbage.  We should re-write it completely.
> > It's better to leave the static checker warnings there to mark that
> > the driver needs to be re-written instead of silencing the warnings
> > but not fixing the code.  Fixing the code proably means re-writing
> > it to be CPU endian.
> 
> Ok -- I'll ditch this patch.
> 
> >> * Removes some spaces to elimite "checkpatch" warnings.
> >
> > I don't see any checkpatch warnings.  I assume you are talking about
> > the indent changes here.
> >
> > The indenting was correct in the original and the patch is wrong.
> 
> So that I know for the future:  if I remove the indentation changes
> 'checkpatch' returns these warnings.  Should I ignore these in the
> future?
> 

Ah, I get it.  Adding a call to le32_to_cpu() made the line too long
so you pulled it in.

The "right way" to fix this in this case is to delete the debug
message.  Another right way would be to add a temporary variable.
Also the casting is bogus and removing it saves space.

	desc = &devpriv->dma_desc[i];
	DEBUG("blah blah %x", le32_to_cpu(desc->next));

regards,
dan carpenter



      parent reply	other threads:[~2013-08-02 14:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-01 17:44 [patch] staging: comedi: gsc_hpdi plx9080: Resolve sparse "different base types" warnings Shaun Laing
2013-08-02  9:43 ` Dan Carpenter
2013-08-02 13:11 ` Shaun Laing
2013-08-02 14:39 ` Dan Carpenter [this message]

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=20130802143959.GG5102@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox