All of lore.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 09:43:17 +0000	[thread overview]
Message-ID: <20130802094317.GA5051@mwanda> (raw)
In-Reply-To: <201308011744.r71HiFtV077932@rivendell.pollux.laing>

On Thu, Aug 01, 2013 at 11:44:15AM -0600, Shaun Laing wrote:
> Hi all,
> 
> Do you see anything wrong with submitting this patch?  My primary concern is
> mixing the functional changes with the aesthetic changes.
> 
> Thanks.
> 
> * Resolves sparse warnings of the form 
> 	"warning: incorrect type in assignment (different base types)".

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.

> * Adds byte swapping to DEBUG_PRINT statements.

These debug statments are just noise.  Delete them instead of
modifying them.

> * Removes some spaces to elimite "checkpatch" warnings.

I don't see any checkpatch warnings.  I assume you are talking about
the indent changes here.

>  		DEBUG_PRINT(" start addr virt 0x%p, phys 0x%lx\n",
> -			    devpriv->desc_dio_buffer[i],
> -			    (unsigned long)devpriv->dma_desc[i].
> -			    pci_start_addr);
> +			devpriv->desc_dio_buffer[i],
> +			(unsigned long)le32_to_cpu(devpriv->dma_desc[i].
> +			pci_start_addr));

The indenting was correct in the original and the patch is wrong.

regards,
dan carpenter

  reply	other threads:[~2013-08-02  9:43 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 [this message]
2013-08-02 13:11 ` Shaun Laing
2013-08-02 14:39 ` Dan Carpenter

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=20130802094317.GA5051@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 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.