public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Andy Whitcroft <apw@shadowen.org>,
	Randy Dunlap <rdunlap@xenotime.net>,
	Joel Schopp <jschopp@austin.ibm.com>,
	Kernel development list <linux-kernel@vger.kernel.org>
Subject: Re: Possible false positive in checkpatch
Date: Fri, 15 Aug 2008 14:58:21 -0700	[thread overview]
Message-ID: <48A5FBFD.5080501@zytor.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0808121017510.2509-100000@iolanthe.rowland.org>

Alan Stern wrote:
> The following appears to be a false positive in checkpatch:
> 
> ERROR: space prohibited after that '*' (ctx:BxW)
> #163: FILE: drivers/usb/core/usb.c:304:
> +#define usb_device_pm_ops      (* (struct pm_ops *) 0)
>                                  ^
> 
> Certainly this is a rather uncommon code construction, but similar
> ones might occur elsewhere.  To my eyes,
> 
> 	(* (type *) ptr)
> 
> looks better than
> 
> 	(*(type *) ptr)
> 
> or
> 
> 	(*(type *)ptr)
> 
> or even
> 
> 	(*(type*)ptr)
> 
> but of course this is a matter of opinion.  Is there any strong feeling 
> about this in the kernel community?
> 

Personally, I rather strongly prefer (*(type *)ptr).

	-hpa

  parent reply	other threads:[~2008-08-15 21:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-12 14:25 Possible false positive in checkpatch Alan Stern
2008-08-12 15:29 ` Krzysztof Halasa
2008-08-12 17:18   ` Andy Whitcroft
2008-08-12 18:01     ` Krzysztof Halasa
2008-08-15 21:58 ` H. Peter Anvin [this message]
2008-08-16 15:26   ` Alan Stern

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=48A5FBFD.5080501@zytor.com \
    --to=hpa@zytor.com \
    --cc=apw@shadowen.org \
    --cc=jschopp@austin.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    --cc=stern@rowland.harvard.edu \
    /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