From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: To: Bart Van Assche Cc: Jens Axboe , linux-block@vger.kernel.org, Christoph Hellwig , Johannes Thumshirn , Sergey Senozhatsky , "David S . Miller" , "Martin K . Petersen" , Mike Snitzer , Dan Williams , Minchan Kim , Nitin Gupta Subject: Re: [PATCH v2] block: Move SECTOR_SIZE and SECTOR_SHIFT definitions into From: "Martin K. Petersen" References: <20180221192240.27836-1-bart.vanassche@wdc.com> Date: Wed, 21 Feb 2018 22:21:24 -0500 In-Reply-To: <20180221192240.27836-1-bart.vanassche@wdc.com> (Bart Van Assche's message of "Wed, 21 Feb 2018 11:22:40 -0800") Message-ID: MIME-Version: 1.0 Content-Type: text/plain List-ID: Bart, > It happens often while I'm preparing a patch for a block driver that > I'm wondering: is a definition of SECTOR_SIZE and/or SECTOR_SHIFT > available for this driver? Do I have to introduce definitions of these > constants before I can use these constants? To avoid this confusion, > move the existing definitions of SECTOR_SIZE and SECTOR_SHIFT into the > header file such that these become available for all > block drivers. Make the SECTOR_SIZE definition in the uapi msdos_fs.h > header file conditional to avoid that including that header file after > causes the compiler to complain about a SECTOR_SIZE > redefinition. Looks good. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering