Skip to contentSkip to conversation

WTF: patch "[PATCH] tpm_tis: make array cmd_getticks static const to shrink" was seriously submitted to be applied to the 4.14-stable tree?

PATCH [email protected] 2 participants 2 messages Nov 21, 2017 – Nov 26, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below was submitted to be applied to the 4.14-stable tree.

I fail to see how this patch meets the stable kernel rules as found at Documentation/process/stable-kernel-rules.rst.

I could be totally wrong, and if so, please respond to <[email protected]> and let me know why this patch should be applied. Otherwise, it is now dropped from my patch queues, never to be seen again.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

Quoted 1 line

From 0bbc931a074a741cf8e6279e8045cf7118586780 Mon Sep 17 00:00:00 2001

From: Colin Ian King <[email protected]>
Date: Fri, 25 Aug 2017 17:45:05 +0100
Subject: [PATCH] tpm_tis: make array cmd_getticks static const to shrink
object code size

Don't populate array cmd_getticks on the stack, instead make it static const. Makes the object code smaller by over 160 bytes:

Before:

   text	   data	    bss	    dec	    hex	filename
  18813	   3152	    128	  22093	   564d	drivers/char/tpm/tpm_tis_core.o

After:

   text	   data	    bss	    dec	    hex	filename
  18554	   3248	    128	  21930	   55aa	drivers/char/tpm/tpm_tis_core.o
drivers/char/tpm/tpm_tis_core.c +1 -1
index 63bc6c3b949e..1e957e923d21 100644
@@ -445,7 +445,7 @@ static int probe_itpm(struct tpm_chip *chip)
 {
 	struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev);
 	int rc = 0;
-	u8 cmd_getticks[] = {
+	static const u8 cmd_getticks[] = {
 		0x00, 0xc1, 0x00, 0x00, 0x00, 0x0a,
 		0x00, 0x00, 0x00, 0xf1
 	};
#1 lore raw
Quoted 5 lines · On Tue, Nov 21, 2017 at 05:51:32PM +0100, [email protected] wrote:

The patch below was submitted to be applied to the 4.14-stable tree.

I fail to see how this patch meets the stable kernel rules as found at Documentation/process/stable-kernel-rules.rst.

Quoted 8 lines

I could be totally wrong, and if so, please respond to <[email protected]> and let me know why this patch should be applied. Otherwise, it is now dropped from my patch queues, never to be seen again.

thanks,

greg k-h

I think it should be dropped (my bad).

/Jarkko