From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from astoria.ccjclearline.com (astoria.ccjclearline.com [64.235.106.9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 50EC21007DA for ; Fri, 22 Apr 2011 06:50:58 +1000 (EST) Received: from cpec03f0ed08c7f-cm001ac318e826.cpe.net.cable.rogers.com ([99.241.2.77] helo=crashcourse.ca) by astoria.ccjclearline.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1QD034-0004OI-Vl for linuxppc-dev@lists.ozlabs.org; Thu, 21 Apr 2011 16:00:23 -0400 Date: Thu, 21 Apr 2011 16:00:18 -0400 (EDT) From: "Robert P. J. Day" To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH] POWERPC: Remove redundant initialization of bsr dev_t declaration. Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Remove the unnecessary initialization of "dev_t bsr_dev" since it's subsequently used in an "alloc_chrdev_region()" call which uses that variable in an output-only fashion. Signed-off-by: Robert P. J. Day --- *Not* compile tested since I don't have a PPC toolchain, but the logic here should be fairly obvious. The current code isn't wrong, just misleading. diff --git a/drivers/char/bsr.c b/drivers/char/bsr.c index a4a6c2f..cf39bc0 100644 --- a/drivers/char/bsr.c +++ b/drivers/char/bsr.c @@ -295,7 +295,7 @@ static int bsr_create_devs(struct device_node *bn) static int __init bsr_init(void) { struct device_node *np; - dev_t bsr_dev = MKDEV(bsr_major, 0); + dev_t bsr_dev; int ret = -ENODEV; int result; -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ========================================================================