[merged] documentation-misc-devices-mei-mei-amt-versionc-remove-unneeded-call-of-mei_deinit.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Subject: [merged] documentation-misc-devices-mei-mei-amt-versionc-remove-unneeded-call-of-mei_deinit.patch removed from -mm tree
To: pebolle@xxxxxxxxxx,dhowells@xxxxxxxxxx,gregkh@xxxxxxxxxxxxxxxxxxx,tomas.winkler@xxxxxxxxx,mm-commits@xxxxxxxxxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
Date: Thu, 09 Jan 2014 14:26:38 -0800


The patch titled
     Subject: Documentation/misc-devices/mei/mei-amt-version.c: remove unneeded call of mei_deinit()
has been removed from the -mm tree.  Its filename was
     documentation-misc-devices-mei-mei-amt-versionc-remove-unneeded-call-of-mei_deinit.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Paul Bolle <pebolle@xxxxxxxxxx>
Subject: Documentation/misc-devices/mei/mei-amt-version.c: remove unneeded call of mei_deinit()

Building mei-amt-version.o triggers a GCC warning:
    Documentation/misc-devices/mei/mei-amt-version.c: In function 'main':
    Documentation/misc-devices/mei/mei-amt-version.c:103:5: warning: 'acmd.fd' is used uninitialized in this function [-Wuninitialized]
      if (cl->fd != -1)
         ^
    Documentation/misc-devices/mei/mei-amt-version.c:443:21: note: 'acmd.fd' was declared here
      struct amt_host_if acmd;
                         ^

GCC is correct. See, the call chain that GCC detects must be
    main()
        amt_host_if_init()
            mei_init()
                mei_deinit()

But when we enter mei_deinit() struct amt_host_if acmd is still
unitialized. That makes the test for (effectively) amt_host_if->mei_cl->fd
bogus.

But it turns out that call of mei_deinit() isn't needed at all. All of
the members of mei_cl will be set later in mei_init() and none will be
used before they are set. So we can simply drop this call of
mei_deinit().

Signed-off-by: Paul Bolle <pebolle@xxxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: Tomas Winkler <tomas.winkler@xxxxxxxxx>
Reported-by: David Howells <dhowells@xxxxxxxxxx>
Acked-by: David Howells <dhowells@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 Documentation/misc-devices/mei/mei-amt-version.c |    2 --
 1 file changed, 2 deletions(-)

diff -puN Documentation/misc-devices/mei/mei-amt-version.c~documentation-misc-devices-mei-mei-amt-versionc-remove-unneeded-call-of-mei_deinit Documentation/misc-devices/mei/mei-amt-version.c
--- a/Documentation/misc-devices/mei/mei-amt-version.c~documentation-misc-devices-mei-mei-amt-versionc-remove-unneeded-call-of-mei_deinit
+++ a/Documentation/misc-devices/mei/mei-amt-version.c
@@ -115,8 +115,6 @@ static bool mei_init(struct mei *me, con
 	struct mei_client *cl;
 	struct mei_connect_client_data data;
 
-	mei_deinit(me);
-
 	me->verbose = verbose;
 
 	me->fd = open("/dev/mei", O_RDWR);
_

Patches currently in -mm which might be from pebolle@xxxxxxxxxx are

linux-next.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux