From patchwork Thu Jul 18 12:55:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 169202 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp2370262ilk; Thu, 18 Jul 2019 05:56:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqyqGqYYO5gq/8FBCAWYIzgwnPgadKV06A9j+jQySuTLKJ2XfbbrX4SBv2I8EsIaBJrjykY8 X-Received: by 2002:a17:90a:8a15:: with SMTP id w21mr51183223pjn.134.1563454562627; Thu, 18 Jul 2019 05:56:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563454562; cv=none; d=google.com; s=arc-20160816; b=JisogqtGC0nWfRgbnVVuooNUXy1WpsIemjhzouyTvLf8Zyl8qaezIH7uXzlTgKbZUm 6vQt+PXcfa42x5P31jfjt0ie0mihDxxcPOyVSuozdKAFwpS9tVyUWUsL1xGpvSEVUAKw x+BO/WpwWVtDnmFRlN+zUY3wlbncnHp8kDW7yT3qhuWeg5HvV5PfEtCzzu5p3bAHl8gf 3kqGNqQ6+fBsh0+h5l5fXtVqYEfOZinbEnDJuc+WIX9DCneJ2dpAKpQQAjjKQx4IQkD/ HkZ7TlXAXFKjyshCabNWtHTwourL3WzoMhYs7xiLEH+gGsgyLm/C9/3QUvSCfWiS5/3B Bf4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=y9KFHBuBwb8v9ERh75NwbKvjveNK0PjANsl4xJXJ/PM=; b=kLxuqsoCqSRepfaALEuBkbJfM2QwF3SMswSpBaG25IGQhh46ulWcyBI9lJ/1TBPq0y 3/k+1S6KuCf2GbFyXtfXxoc9uBie+oyrVQcI4+KpwD+aa0x7fmLTvDrf/M0ztNyq3fDI iwrVKhTwS8u3piLdB3UpAq6gCwGJAuN8yFZlb2f++Pueg1itD/CbfhifxWNCgq5bPR0b VxDiR9rD8HeAlJ87EjQSrhjdDlh5k6g+N6QvFnOzOqF541/uwJaecMCFi/p6z/BO8dxw 0xn6+ZSsgGRrSJWZUbyMbV8g35mHKK9Zs2T6WHW9tzgMc0arc14dNq84iUnxft+MqMT8 2bFg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h15si1688920plr.23.2019.07.18.05.56.02; Thu, 18 Jul 2019 05:56:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390374AbfGRM4B (ORCPT + 29 others); Thu, 18 Jul 2019 08:56:01 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:38777 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726715AbfGRM4A (ORCPT ); Thu, 18 Jul 2019 08:56:00 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1MPXxi-1i1nLB3om2-00MY3T; Thu, 18 Jul 2019 14:55:12 +0200 From: Arnd Bergmann To: Christoph Hellwig , "Darrick J. Wong" , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: Arnd Bergmann , Christoph Hellwig , Andreas Gruenbacher , Hannes Reinecke , Souptick Joarder , linux-kernel@vger.kernel.org Subject: [PATCH] iomap: hide iomap_sector with CONFIG_BLOCK=n Date: Thu, 18 Jul 2019 14:55:01 +0200 Message-Id: <20190718125509.775525-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:fYyPEEJ/6NJ+zJ5owzzApq3jp7UZMtX7HEEZzIzdqq8KSAMWsnh 3psNUFCs5XMvOrSShZEXlpdG88Gk4YRFrDL0q2RpFyt/dRpbmTNbMUlJ3NUXm8k9B0ZyWVM xhm1BwUhV4WXRDLaGEG5P4Qiv300giFieJNupaLYe66j0zu/hBBf5OmPL1DoFjVRobdA/6t tY0Jnhou4TYKpux1AzD2g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:W05Qfkw4Zxw=:2VPGQzIHjmhFJUTjaduOol glg6ZoBIjxvjEIfBdrL3DdZd6r24yamiE3AfxLbPi5Y0V/lFau+4KxlsJQM/ILwvNrv7if+pb Ae0dgmxjLZ6CVvkQmjmWjIkvCq+gPkdfdV8JFhRN048CQ1JoH5qJpUqZBudZJjlC9ixZl6im1 11AryixtiGVNIpDDBLo0UPNy2AzezJrIvVz9yCHEl842U9sqZh8SE0GeK5UD5uZaX8/WnTq4i FnWugILOEKacSf1/B+h2a1F0TLLTH9vEnRUaXi4AfDZ1M7LQRB29kIsym7YaGJxoOdDTAIndJ oaUwoQPURFHh/krkFfTWnqXeBhl5oSVOzilRBk0vfHdqWHQtpYo7Ni798FiAOmhrByzN0xu+L 83sujb6oVePBnHX2Hfo8J05LnIYug7pQcWZwil9ZVNXh27cziRvPtWi+/YOqKBIh1rBy026Ci uiVO9dYhhu8/wpGErNNz6NVNxVK4yGA98r3ZHjOtOX72wG9c69r1o/aVfjGsr+KIa4xs6C9/t sJHOi5MJGjdOQkoTMZxIRAjqeDGuEc9QkEX31W+LsI3519sPNRTgYWWEfpdWDlAFV3iBRkgEP vQ1CGu20Hke1Fgs0LkmFzM16SJ+BSo2DXpLLNdsCy5HLAmG3QFVs4k3m1lLudyFNFjOiZr7sn gH+fiTFUbW/ldL9YuJnHaFiAKcH7dCeZRVtmASSrAJbcsw/22cFT10A3z0UWYfbUJq1DZbmo2 /MNEax1GpiBeyZ96AhI8M3U+GRyNQhjrq2TRSw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- include/linux/iomap.h | 2 ++ 1 file changed, 2 insertions(+) -- 2.20.0 diff --git a/include/linux/iomap.h b/include/linux/iomap.h index bc499ceae392..bb07f31e3b6f 100644 --- a/include/linux/iomap.h +++ b/include/linux/iomap.h @@ -70,11 +70,13 @@ struct iomap { const struct iomap_page_ops *page_ops; }; +#ifdef CONFIG_BLOCK static inline sector_t iomap_sector(struct iomap *iomap, loff_t pos) { return (iomap->addr + pos - iomap->offset) >> SECTOR_SHIFT; } +#endif /* * When a filesystem sets page_ops in an iomap mapping it returns, page_prepare