From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2C6DC76195 for ; Thu, 18 Jul 2019 12:57:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 977E02173E for ; Thu, 18 Jul 2019 12:57:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390418AbfGRM5H (ORCPT ); Thu, 18 Jul 2019 08:57:07 -0400 Received: from verein.lst.de ([213.95.11.211]:59415 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726715AbfGRM5G (ORCPT ); Thu, 18 Jul 2019 08:57:06 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id C185E68B02; Thu, 18 Jul 2019 14:57:03 +0200 (CEST) Date: Thu, 18 Jul 2019 14:57:03 +0200 From: Christoph Hellwig To: Arnd Bergmann Cc: Christoph Hellwig , "Darrick J. Wong" , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, Christoph Hellwig , Andreas Gruenbacher , Hannes Reinecke , Souptick Joarder , linux-kernel@vger.kernel.org Subject: Re: [PATCH] iomap: hide iomap_sector with CONFIG_BLOCK=n Message-ID: <20190718125703.GA28332@lst.de> References: <20190718125509.775525-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190718125509.775525-1-arnd@arndb.de> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Thu, Jul 18, 2019 at 02:55:01PM +0200, Arnd Bergmann wrote: > When CONFIG_BLOCK is disabled, SECTOR_SHIFT is unknown: > > In file included from :3: > include/linux/iomap.h:76:48: error: use of undeclared identifier 'SECTOR_SHIFT' > return (iomap->addr + pos - iomap->offset) >> SECTOR_SHIFT; > > Since there are no callers in this case, just hide the function in > the same ifdef. > > Fixes: db074436f421 ("iomap: move the direct IO code into a separate file") > Signed-off-by: Arnd Bergmann Can we just not include iomap.c when CONFIG_BLOCK is not set? Which file do you see this with?