[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <200711281207.38252.hs4233@mail.mn-solutions.de>
Date: Wed, 28 Nov 2007 12:07:38 +0100
From: Holger Schurig <hs4233@...l.mn-solutions.de>
To: apw@...dowen.org, rdunlap@...otime.net, jschopp@...tin.ibm.com
Cc: linux-kernel@...r.kernel.org
Subject: bug in checkpath.pl
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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists