From patchwork Mon Jun 13 13:04:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9172897 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8E8936075D for ; Mon, 13 Jun 2016 13:04:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8062E1FF45 for ; Mon, 13 Jun 2016 13:04:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 74EA321C9A; Mon, 13 Jun 2016 13:04:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2499D1FF45 for ; Mon, 13 Jun 2016 13:04:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422893AbcFMNEX (ORCPT ); Mon, 13 Jun 2016 09:04:23 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:63918 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161058AbcFMNEV (ORCPT ); Mon, 13 Jun 2016 09:04:21 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue103) with ESMTPA (Nemesis) id 0MCOnp-1bLTxS14jp-0095Ij; Mon, 13 Jun 2016 15:04:03 +0200 From: Arnd Bergmann To: Sage Weil Cc: Arnd Bergmann , Jan Beulich , Michal Marek , Ilya Dryomov , "Yan, Zheng" , Alex Elder , ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ceph: fix symbol versioning for ceph_monc_do_statfs Date: Mon, 13 Jun 2016 15:04:56 +0200 Message-Id: <1465823125-171114-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:r9WoVSYLeVIklHBzW18ilpbthz+JNMd64sxCB8IO0bWiWXmOKdg 2MRrwzLNNXXzyMBVvfnsnruqTKB2jVwWhtGhW2rDlKJfNrAOPpz6rXHd13WY1EbXcigrvfR RwS4RVa+pMt5W+3iJA6SsCY54g1XcmD2mEOyZyOmaykrfbcKJxc97mfkSc0Hij9CJ7IZ0Ma I83bXjWcbFrcifxTzkW1g== X-UI-Out-Filterresults: notjunk:1; V01:K0:CVWN3usA4OU=:Yd3qe8/ug0wmLpqMxTifFC pwEwcH9gD1li3dG9JBQ44Sai0eYJuCqUo5BJwFLta+OKxT4npWQum8svfJxYquLusAlSaGeqc Di2nAMYTSIv9akq+dyXaVZWScPsHsWHOSCzs1Ty8AIwCD4hrxkzoozUGoevoV6NY4Sq7uV3dQ 1prCEXJM5FrAb9FhVS68h3dAaklbB1iJN+x8BaFQ3ZNOD2sIc9aFI3NC2RQSSm1PtzzM78r5s bFWbx/7xrK+PAIOPrNU4D1mt3Jnc/wRoISW3iR4316xj/4ouqb7PpOLceXCbXH5FgcHfesR/a sM67g5BLPSE6/GOXk1R+cUiIIpQaj9ZuWbOJ1cl+hy4ms7qV0CX2nQdvy114M/8CmehEqt+zK YHwPPaadPqsMRPHK/lqccIQu0rUekmgySuT4Tq4wR7UHE2L9DudNdROtxJ/Wxa6gI6BJvDlsz Cjv+CxkxEjf4FqFLVmoxWmhCzAkTmv3TX/4UConCN4BkBR7fPL1HiXhcZJy0hFfLELjh1EPXU 86z0KEOMvVL7rOYc0U/KvK+7x77qUXdUBWBPAYAfrf0qrfY21ap+vORhS0QXd93KTNsndeljk ptihMmNjCOgVmOg8fMgbs5GTYAQ4fzFvp+xLIx3P9H+ZFd1HdhSfMMFNTuWvoznvSR2y8XiPl B1rPMBdLeZUbJnCekGqjuz7QoHtyR9Nn9VEhz7UzptyzcAA7SAIBN+CHF2M2oy2jctpE= Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The genksyms helper in the kernel cannot parse a type definition like "typeof(((type *)0)->keyfld)" that is used in the DEFINE_RB_FUNCS helper, causing the following EXPORT_SYMBOL() statement to be ignored when computing the crcs, and triggering a warning about this: WARNING: "ceph_monc_do_statfs" [fs/ceph/ceph.ko] has no CRC To work around the problem, we can rewrite the type to reference an undefined 'extern' symbol instead of a NULL pointer. This is evidently ok for genksyms, and it no longer complains about the line when calling it with 'genksyms -w'. I've looked briefly into extending genksyms instead, but it seems really hard to do. Jan Beulich introduced basic support for 'typeof' a while ago in dc53324060f3 ("genksyms: fix typeof() handling"), but that is not sufficient for the expression we have here. Signed-off-by: Arnd Bergmann Fixes: fcd00b68bbe2 ("libceph: DEFINE_RB_FUNCS macro") Cc: Jan Beulich Cc: Michal Marek --- include/linux/ceph/libceph.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h index 690985daad1c..6b79a6ba39ca 100644 --- a/include/linux/ceph/libceph.h +++ b/include/linux/ceph/libceph.h @@ -214,8 +214,9 @@ static void erase_##name(struct rb_root *root, type *t) \ } #define DEFINE_RB_LOOKUP_FUNC(name, type, keyfld, nodefld) \ +extern type __lookup_##name##_key; \ static type *lookup_##name(struct rb_root *root, \ - typeof(((type *)0)->keyfld) key) \ + typeof(__lookup_##name##_key.keyfld) key) \ { \ struct rb_node *n = root->rb_node; \ \