From: Holger Schurig <hs4233@mail.mn-solutions.de>
To: apw@shadowen.org, rdunlap@xenotime.net, jschopp@austin.ibm.com
Cc: linux-kernel@vger.kernel.org
Subject: bug in checkpath.pl
Date: Wed, 28 Nov 2007 12:07:38 +0100 [thread overview]
Message-ID: <200711281207.38252.hs4233@mail.mn-solutions.de> (raw)
I have a case where scripts/checkpatch.pl returns a false error.
First, here is the code:
static int lbs_scan_add_rates_tlv(u8 *tlv)
{
int i;
struct mrvlietypes_ratesparamset *rate_tlv =
(struct mrvlietypes_ratesparamset *) tlv;
rate_tlv->header.type = cpu_to_le16(TLV_TYPE_RATES);
tlv += sizeof(rate_tlv->header);
for (i = 0; i < MAX_RATES; i++) {
*tlv = lbs_bg_rates[i];
if (*tlv == 0)
break;
if (*tlv == 0x02 || *tlv == 0x04 ||
*tlv == 0x0b || *tlv == 0x16)
*tlv |= 0x80;
tlv++;
}
rate_tlv->header.len = i;
return sizeof(rate_tlv->header) + i;
}
And here the error from checkpatch.pl:
ERROR: need consistent spacing around '*' (ctx:WxV)
#553: FILE: drivers/net/wireless/libertas/scan.c:438:
+ *tlv |= 0x80;
This error seems wrong, tlv is a pointer to some u8 value
(a.k.a. unsigned char), and it is very well allowed to
operate on it via *variablename |= 0x80;
next reply other threads:[~2007-11-28 11:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-28 11:07 Holger Schurig [this message]
2007-11-29 10:05 ` bug in checkpath.pl Andy Whitcroft
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=200711281207.38252.hs4233@mail.mn-solutions.de \
--to=hs4233@mail.mn-solutions.de \
--cc=apw@shadowen.org \
--cc=jschopp@austin.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@xenotime.net \
/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