Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1276225 > unrolled thread

[PATCH v2 0/3] scsi: reduce CONFIG_SCSI_CONSTANTS=y impact by 8k

Started byRasmus Villemoes <linux@rasmusvillemoes.dk>
First post2015-11-24 10:50 +0100
Last post2015-11-24 16:10 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2 0/3] scsi: reduce CONFIG_SCSI_CONSTANTS=y impact by 8k Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2015-11-24 10:50 +0100
    [PATCH v2 1/3] scsi: make some Additional Sense strings more grep'able Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2015-11-24 10:50 +0100
    Re: [PATCH v2 0/3] scsi: reduce CONFIG_SCSI_CONSTANTS=y impact by  8k Hannes Reinecke <hare@suse.de> - 2015-11-24 16:10 +0100

#1276225 — [PATCH v2 0/3] scsi: reduce CONFIG_SCSI_CONSTANTS=y impact by 8k

FromRasmus Villemoes <linux@rasmusvillemoes.dk>
Date2015-11-24 10:50 +0100
Subject[PATCH v2 0/3] scsi: reduce CONFIG_SCSI_CONSTANTS=y impact by 8k
Message-ID<qyioy-6mU-9@gated-at.bofh.it>
This reduces the impact of choosing CONFIG_SCSI_CONSTANTS by about 8KB.

2dd951ecd511 ("scsi: Conditionally compile in constants.c") updated
the Kconfig help text from 12KB to 75KB. The 12K predated git so was
certainly outdated. But I'm not sure where the 75K comes from; using
size(1) on a defconfig (with/without this config option) vmlinux shows
a difference of about 47K, and 39K after these patches are applied. In
any case, I've left the Kconfig text alone, since I'm not sure I'm
counting the same way the 75K was computed (I'm fairly certain of the
8K delta, however).

Tested with a trivial module calling scsi_extd_sense_format with a few
random known codes and comparing the result to the expected value.

v2: prepend patch to unsplit a few string literals for greppability,
leave the NULL sentinel in the .c file in 2/3 (it's removed in 3/3
either way).

Rasmus Villemoes (3):
  scsi: make some Additional Sense strings more grep'able
  scsi: move Additional Sense Codes to separate file
  scsi: reduce CONFIG_SCSI_CONSTANTS=y impact by 8k

 drivers/scsi/constants.c   | 859 ++-------------------------------------------
 drivers/scsi/sense_codes.h | 826 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 847 insertions(+), 838 deletions(-)
 create mode 100644 drivers/scsi/sense_codes.h

-- 
2.6.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1276228 — [PATCH v2 1/3] scsi: make some Additional Sense strings more grep'able

FromRasmus Villemoes <linux@rasmusvillemoes.dk>
Date2015-11-24 10:50 +0100
Subject[PATCH v2 1/3] scsi: make some Additional Sense strings more grep'able
Message-ID<qyioy-6mU-23@gated-at.bofh.it>
In reply to#1276225
There's little point in breaking these strings over multiple lines.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
 drivers/scsi/constants.c | 27 +++++++++------------------
 1 file changed, 9 insertions(+), 18 deletions(-)

diff --git a/drivers/scsi/constants.c b/drivers/scsi/constants.c
index fa09d4be2b53..58d94e3c3713 100644
--- a/drivers/scsi/constants.c
+++ b/drivers/scsi/constants.c
@@ -346,11 +346,9 @@ static const struct error_info additional[] =
 	{0x0407, "Logical unit not ready, operation in progress"},
 	{0x0408, "Logical unit not ready, long write in progress"},
 	{0x0409, "Logical unit not ready, self-test in progress"},
-	{0x040A, "Logical unit not accessible, asymmetric access state "
-	 "transition"},
+	{0x040A, "Logical unit not accessible, asymmetric access state transition"},
 	{0x040B, "Logical unit not accessible, target port in standby state"},
-	{0x040C, "Logical unit not accessible, target port in unavailable "
-	 "state"},
+	{0x040C, "Logical unit not accessible, target port in unavailable state"},
 	{0x040D, "Logical unit not ready, structure check required"},
 	{0x040E, "Logical unit not ready, security session in progress"},
 	{0x0410, "Logical unit not ready, auxiliary memory not accessible"},
@@ -363,11 +361,9 @@ static const struct error_info additional[] =
 	{0x0417, "Logical unit not ready, calibration required"},
 	{0x0418, "Logical unit not ready, a door is open"},
 	{0x0419, "Logical unit not ready, operating in sequential mode"},
-	{0x041A, "Logical unit not ready, start stop unit command in "
-	 "progress"},
+	{0x041A, "Logical unit not ready, start stop unit command in progress"},
 	{0x041B, "Logical unit not ready, sanitize in progress"},
-	{0x041C, "Logical unit not ready, additional power use not yet "
-	 "granted"},
+	{0x041C, "Logical unit not ready, additional power use not yet granted"},
 	{0x041D, "Logical unit not ready, configuration in progress"},
 	{0x041E, "Logical unit not ready, microcode activation required"},
 	{0x041F, "Logical unit not ready, microcode download required"},
@@ -559,8 +555,7 @@ static const struct error_info additional[] =
 	{0x2300, "Invalid token operation, cause not reportable"},
 	{0x2301, "Invalid token operation, unsupported token type"},
 	{0x2302, "Invalid token operation, remote token usage not supported"},
-	{0x2303, "Invalid token operation, remote rod token creation not "
-	 "supported"},
+	{0x2303, "Invalid token operation, remote rod token creation not supported"},
 	{0x2304, "Invalid token operation, token unknown"},
 	{0x2305, "Invalid token operation, token corrupt"},
 	{0x2306, "Invalid token operation, token revoked"},
@@ -641,8 +636,7 @@ static const struct error_info additional[] =
 	{0x2A0D, "Data encryption capabilities changed"},
 	{0x2A10, "Timestamp changed"},
 	{0x2A11, "Data encryption parameters changed by another i_t nexus"},
-	{0x2A12, "Data encryption parameters changed by vendor specific "
-		 "event"},
+	{0x2A12, "Data encryption parameters changed by vendor specific event"},
 	{0x2A13, "Data encryption key instance counter has changed"},
 	{0x2A14, "SA creation capabilities data has changed"},
 	{0x2A15, "Medium removal prevention preempted"},
@@ -759,8 +753,7 @@ static const struct error_info additional[] =
 	{0x3B19, "Element enabled"},
 	{0x3B1A, "Data transfer device removed"},
 	{0x3B1B, "Data transfer device inserted"},
-	{0x3B1C, "Too many logical objects on partition to support "
-	 "operation"},
+	{0x3B1C, "Too many logical objects on partition to support operation"},
 
 	{0x3D00, "Invalid bits in identify message"},
 
@@ -957,8 +950,7 @@ static const struct error_info additional[] =
 	{0x5D39, "Data channel impending failure throughput performance"},
 	{0x5D3A, "Data channel impending failure seek time performance"},
 	{0x5D3B, "Data channel impending failure spin-up retry count"},
-	{0x5D3C, "Data channel impending failure drive calibration retry "
-	 "count"},
+	{0x5D3C, "Data channel impending failure drive calibration retry count"},
 	{0x5D40, "Servo impending failure general hard drive failure"},
 	{0x5D41, "Servo impending failure drive error rate too high"},
 	{0x5D42, "Servo impending failure data error rate too high"},
@@ -1070,8 +1062,7 @@ static const struct error_info additional[] =
 
 	{0x6E00, "Command to logical unit failed"},
 
-	{0x6F00, "Copy protection key exchange failure - authentication "
-	 "failure"},
+	{0x6F00, "Copy protection key exchange failure - authentication failure"},
 	{0x6F01, "Copy protection key exchange failure - key not present"},
 	{0x6F02, "Copy protection key exchange failure - key not established"},
 	{0x6F03, "Read of scrambled sector without authentication"},
-- 
2.6.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1276557 — Re: [PATCH v2 0/3] scsi: reduce CONFIG_SCSI_CONSTANTS=y impact by 8k

FromHannes Reinecke <hare@suse.de>
Date2015-11-24 16:10 +0100
SubjectRe: [PATCH v2 0/3] scsi: reduce CONFIG_SCSI_CONSTANTS=y impact by 8k
Message-ID<qynoe-1lP-31@gated-at.bofh.it>
In reply to#1276225
On 11/24/2015 10:42 AM, Rasmus Villemoes wrote:
> This reduces the impact of choosing CONFIG_SCSI_CONSTANTS by about 8KB.
> 
> 2dd951ecd511 ("scsi: Conditionally compile in constants.c") updated
> the Kconfig help text from 12KB to 75KB. The 12K predated git so was
> certainly outdated. But I'm not sure where the 75K comes from; using
> size(1) on a defconfig (with/without this config option) vmlinux shows
> a difference of about 47K, and 39K after these patches are applied. In
> any case, I've left the Kconfig text alone, since I'm not sure I'm
> counting the same way the 75K was computed (I'm fairly certain of the
> 8K delta, however).
> 
> Tested with a trivial module calling scsi_extd_sense_format with a few
> random known codes and comparing the result to the expected value.
> 
> v2: prepend patch to unsplit a few string literals for greppability,
> leave the NULL sentinel in the .c file in 2/3 (it's removed in 3/3
> either way).
> 
> Rasmus Villemoes (3):
>   scsi: make some Additional Sense strings more grep'able
>   scsi: move Additional Sense Codes to separate file
>   scsi: reduce CONFIG_SCSI_CONSTANTS=y impact by 8k
> 
>  drivers/scsi/constants.c   | 859 ++-------------------------------------------
>  drivers/scsi/sense_codes.h | 826 +++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 847 insertions(+), 838 deletions(-)
>  create mode 100644 drivers/scsi/sense_codes.h
> 
For the whole series:

Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		               zSeries & Storage
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web