From: "Witold Szczeponik" <Witold.Szczeponik@gmx.net>
To: linux-acpi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH, trivial] PNP: Use constant PNP_ID_LEN instead of literal number
Date: Sun, 27 Nov 2011 22:26:20 +0100 [thread overview]
Message-ID: <20111127212620.268500@gmx.net> (raw)
The attached patch uses the constant PNP_ID_LEN instead of using a
literal number for the length of a PNP ID in the scope of PNP quirks.
As a consequence, all IDs used in PNP quirks (c.f. "drivers/pnp/quirks.c")
are now zero-terminated and standard functions that depend on the IDs
to be zero-terminated now work reliably (c.f. "strlen" in "drivers/pnp/driver.c",
function "compare_pnp_id").
The patch is applied against 3.1.
Signed-off-by: Witold Szczeponik <Witold.Szczeponik@gmx.net>
Index: linux/include/linux/pnp.h
===================================================================
--- linux.orig/include/linux/pnp.h
+++ linux/include/linux/pnp.h
@@ -295,7 +295,7 @@ static inline void pnp_set_drvdata(struc
}
struct pnp_fixup {
- char id[7];
+ char id[PNP_ID_LEN];
void (*quirk_function) (struct pnp_dev * dev); /* fixup function */
};
--
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
Jetzt informieren: http://www.gmx.net/de/go/freephone
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: "Witold Szczeponik" <Witold.Szczeponik@gmx.net>
To: linux-acpi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH, trivial] PNP: Use constant PNP_ID_LEN instead of literal number
Date: Sun, 27 Nov 2011 22:26:20 +0100 [thread overview]
Message-ID: <20111127212620.268500@gmx.net> (raw)
The attached patch uses the constant PNP_ID_LEN instead of using a
literal number for the length of a PNP ID in the scope of PNP quirks.
As a consequence, all IDs used in PNP quirks (c.f. "drivers/pnp/quirks.c")
are now zero-terminated and standard functions that depend on the IDs
to be zero-terminated now work reliably (c.f. "strlen" in "drivers/pnp/driver.c",
function "compare_pnp_id").
The patch is applied against 3.1.
Signed-off-by: Witold Szczeponik <Witold.Szczeponik@gmx.net>
Index: linux/include/linux/pnp.h
===================================================================
--- linux.orig/include/linux/pnp.h
+++ linux/include/linux/pnp.h
@@ -295,7 +295,7 @@ static inline void pnp_set_drvdata(struc
}
struct pnp_fixup {
- char id[7];
+ char id[PNP_ID_LEN];
void (*quirk_function) (struct pnp_dev * dev); /* fixup function */
};
--
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
Jetzt informieren: http://www.gmx.net/de/go/freephone
next reply other threads:[~2011-11-27 21:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-27 21:26 Witold Szczeponik [this message]
2011-11-27 21:26 ` [PATCH, trivial] PNP: Use constant PNP_ID_LEN instead of literal number Witold Szczeponik
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=20111127212620.268500@gmx.net \
--to=witold.szczeponik@gmx.net \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@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.