[{"id":645,"web_url":"http://patchwork.ozlabs.org/comment/645/","msgid":"<20080913104641.GE21603@xi.wantstofly.org>","list_archive_url":null,"date":"2008-09-13T10:46:41","subject":"Re: [PATCH 2/3] [MTD] physmap.c: Add #endif comments","submitter":{"id":94,"url":"http://patchwork.ozlabs.org/api/people/94/","name":"Lennert Buytenhek","email":"buytenh@wantstofly.org"},"content":"On Fri, Sep 12, 2008 at 11:33:03PM -0700, Zev Weiss wrote:\n\n> Adding comments to a few of the less painfully-obvious #endifs.\n> \n> Signed-off-by: Zev Weiss <zevweiss@gmail.com>\n> ---\n>   drivers/mtd/maps/physmap.c |    6 +++---\n>   1 files changed, 3 insertions(+), 3 deletions(-)\n> \n> diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c\n> index 6fba0d4..49e2039 100644\n> --- a/drivers/mtd/maps/physmap.c\n> +++ b/drivers/mtd/maps/physmap.c\n> @@ -244,7 +244,7 @@ static void physmap_flash_shutdown(struct platform_device *dev)\n>   #define physmap_flash_suspend NULL\n>   #define physmap_flash_resume NULL\n>   #define physmap_flash_shutdown NULL\n> -#endif\n> +#endif /* CONFIG_PM */\n> \n>   static struct platform_driver physmap_flash_driver = {\n>   \t.probe\t\t= physmap_flash_probe,\n> @@ -302,8 +302,8 @@ void physmap_set_partitions(struct mtd_partition *parts, int\n> num_parts)\n>   \tphysmap_flash_data.nr_parts = num_parts;\n>   \tphysmap_flash_data.parts = parts;\n>   }\n> -#endif\n> -#endif\n> +#endif /* CONFIG_MTD_PARTITIONS */\n> +#endif /* PHYSMAP_COMPAT */\n\nI thought that this was frowned upon.  (I don't like it myself, and\nmy editor is perfectly well capable of pointing out to me which ifdef\nmatches up with which endif.)","headers":{"Return-Path":"<linux-mtd-bounces+patchwork=ozlabs.org@lists.infradead.org>","X-Original-To":"patchwork@ozlabs.org","Delivered-To":"patchwork@ozlabs.org","Received":["from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34])\n\t(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\n\t(Client did not present a certificate)\n\tby ozlabs.org (Postfix) with ESMTPS id 20B3CDDDE1\n\tfor <patchwork@ozlabs.org>; Sat, 13 Sep 2008 20:46:53 +1000 (EST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.68 #1 (Red Hat Linux))\n\tid 1KeSeK-0002BJ-6V; Sat, 13 Sep 2008 10:46:44 +0000","from [2002:53a0:b870::1] (helo=xi.wantstofly.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.68 #1 (Red Hat Linux))\n\tid 1KeSeH-0002BE-Sc\n\tfor linux-mtd@lists.infradead.org; Sat, 13 Sep 2008 10:46:42 +0000","by xi.wantstofly.org (Postfix, from userid 500)\n\tid 7671B7FAB1; Sat, 13 Sep 2008 12:46:41 +0200 (CEST)"],"Date":"Sat, 13 Sep 2008 12:46:41 +0200","From":"Lennert Buytenhek <buytenh@wantstofly.org>","To":"Zev Weiss <zevweiss@gmail.com>","Subject":"Re: [PATCH 2/3] [MTD] physmap.c: Add #endif comments","Message-ID":"<20080913104641.GE21603@xi.wantstofly.org>","References":"<48CB5E9F.9060109@gmail.com>","Mime-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<48CB5E9F.9060109@gmail.com>","User-Agent":"Mutt/1.4.2.2i","X-Spam-Score":"-0.0 (/)","Cc":"linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org","X-BeenThere":"linux-mtd@lists.infradead.org","X-Mailman-Version":"2.1.9","Precedence":"list","List-Id":"Linux MTD discussion mailing list <linux-mtd.lists.infradead.org>","List-Unsubscribe":"<http://lists.infradead.org/mailman/listinfo/linux-mtd>,\n\t<mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-mtd>","List-Post":"<mailto:linux-mtd@lists.infradead.org>","List-Help":"<mailto:linux-mtd-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-mtd>,\n\t<mailto:linux-mtd-request@lists.infradead.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"linux-mtd-bounces@lists.infradead.org","Errors-To":"linux-mtd-bounces+patchwork=ozlabs.org@lists.infradead.org"}},{"id":648,"web_url":"http://patchwork.ozlabs.org/comment/648/","msgid":"<48CBA377.9020802@gmail.com>","list_archive_url":null,"date":"2008-09-13T11:26:47","subject":"Re: [PATCH 2/3] [MTD] physmap.c: Add #endif comments","submitter":{"id":35,"url":"http://patchwork.ozlabs.org/api/people/35/","name":"Zev Weiss","email":"zevweiss@gmail.com"},"content":"Lennert Buytenhek wrote:\n> On Fri, Sep 12, 2008 at 11:33:03PM -0700, Zev Weiss wrote:\n> \n>> Adding comments to a few of the less painfully-obvious #endifs.\n>>\n>> Signed-off-by: Zev Weiss <zevweiss@gmail.com>\n>> ---\n>>   drivers/mtd/maps/physmap.c |    6 +++---\n>>   1 files changed, 3 insertions(+), 3 deletions(-)\n>>\n>> diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c\n>> index 6fba0d4..49e2039 100644\n>> --- a/drivers/mtd/maps/physmap.c\n>> +++ b/drivers/mtd/maps/physmap.c\n>> @@ -244,7 +244,7 @@ static void physmap_flash_shutdown(struct platform_device *dev)\n>>   #define physmap_flash_suspend NULL\n>>   #define physmap_flash_resume NULL\n>>   #define physmap_flash_shutdown NULL\n>> -#endif\n>> +#endif /* CONFIG_PM */\n>>\n>>   static struct platform_driver physmap_flash_driver = {\n>>   \t.probe\t\t= physmap_flash_probe,\n>> @@ -302,8 +302,8 @@ void physmap_set_partitions(struct mtd_partition *parts, int\n>> num_parts)\n>>   \tphysmap_flash_data.nr_parts = num_parts;\n>>   \tphysmap_flash_data.parts = parts;\n>>   }\n>> -#endif\n>> -#endif\n>> +#endif /* CONFIG_MTD_PARTITIONS */\n>> +#endif /* PHYSMAP_COMPAT */\n> \n> I thought that this was frowned upon.  (I don't like it myself, and\n> my editor is perfectly well capable of pointing out to me which ifdef\n> matches up with which endif.)\n> \n\nAh, OK -- I found it slightly hard to follow the ones that get longer than a \nscreenful or so, and I don't have my editor set to match them up nicely (though I \nmight look into that).  It's something I'm accustomed to doing and seeing, and I saw \nno mention of it one way or another in Documentation/CodingStyle, so I didn't really \ngive it a second thought.","headers":{"Return-Path":"<linux-mtd-bounces+patchwork=ozlabs.org@lists.infradead.org>","X-Original-To":"patchwork@ozlabs.org","Delivered-To":"patchwork@ozlabs.org","Received":["from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34])\n\t(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\n\t(Client did not present a certificate)\n\tby ozlabs.org (Postfix) with ESMTPS id CA549DDDE0\n\tfor <patchwork@ozlabs.org>; Sat, 13 Sep 2008 21:27:01 +1000 (EST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.68 #1 (Red Hat Linux))\n\tid 1KeTHD-0006Gu-6s; Sat, 13 Sep 2008 11:26:55 +0000","from rv-out-0708.google.com ([209.85.198.240])\n\tby bombadil.infradead.org with esmtp (Exim 4.68 #1 (Red Hat Linux))\n\tid 1KeTHA-0006Ge-D1\n\tfor linux-mtd@lists.infradead.org; Sat, 13 Sep 2008 11:26:53 +0000","by rv-out-0708.google.com with SMTP id b17so1606078rvf.42\n\tfor <linux-mtd@lists.infradead.org>;\n\tSat, 13 Sep 2008 04:26:51 -0700 (PDT)","by 10.142.173.14 with SMTP id v14mr1849339wfe.315.1221305210766;\n\tSat, 13 Sep 2008 04:26:50 -0700 (PDT)","from ?192.168.1.2? ( [24.84.185.161])\n\tby mx.google.com with ESMTPS id 29sm17507235wfg.0.2008.09.13.04.26.48\n\t(version=TLSv1/SSLv3 cipher=RC4-MD5);\n\tSat, 13 Sep 2008 04:26:49 -0700 (PDT)"],"Message-ID":"<48CBA377.9020802@gmail.com>","Date":"Sat, 13 Sep 2008 04:26:47 -0700","From":"Zev Weiss <zevweiss@gmail.com>","User-Agent":"Thunderbird 2.0.0.16 (X11/20080723)","MIME-Version":"1.0","To":"Lennert Buytenhek <buytenh@wantstofly.org>","Subject":"Re: [PATCH 2/3] [MTD] physmap.c: Add #endif comments","References":"<48CB5E9F.9060109@gmail.com>\n\t<20080913104641.GE21603@xi.wantstofly.org>","In-Reply-To":"<20080913104641.GE21603@xi.wantstofly.org>","X-Spam-Score":"0.0 (/)","Cc":"linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org","X-BeenThere":"linux-mtd@lists.infradead.org","X-Mailman-Version":"2.1.9","Precedence":"list","List-Id":"Linux MTD discussion mailing list <linux-mtd.lists.infradead.org>","List-Unsubscribe":"<http://lists.infradead.org/mailman/listinfo/linux-mtd>,\n\t<mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-mtd>","List-Post":"<mailto:linux-mtd@lists.infradead.org>","List-Help":"<mailto:linux-mtd-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-mtd>,\n\t<mailto:linux-mtd-request@lists.infradead.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"linux-mtd-bounces@lists.infradead.org","Errors-To":"linux-mtd-bounces+patchwork=ozlabs.org@lists.infradead.org"}}]