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=-4.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=ham 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 54F90C433F4 for ; Sun, 23 Sep 2018 07:40:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E1C5921473 for ; Sun, 23 Sep 2018 07:40:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="sBNmx9ix" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E1C5921473 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726093AbeIWNgi (ORCPT ); Sun, 23 Sep 2018 09:36:38 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:34016 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726011AbeIWNgh (ORCPT ); Sun, 23 Sep 2018 09:36:37 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w8N7dw9C035809; Sun, 23 Sep 2018 07:39:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=K1Yg1kIXcDXrcdOAiJWU2OncbujbsHHVMZyEqcei0uQ=; b=sBNmx9ix4Q5Flw/gnnj3YpJ/T0ZVCrMKG+G/og/48SdraeHZzYzbugXiDws/HULLCixu Ja6S+rkT8kGNbmtyFCHEkP3xHactl4WupPtZba/f28F+BOk9KXwYT6+sDKNlOJrqjDAt 0LgB1jJ6xRZOvqrBGVMrGQNNu+fFjKEFrilq4hLw/MgN7rzKJQ27p99Ivlu6/nDyne8T 1c2vq2S0qjbxRS2mXjgdav5UH0A5aGwsDvCq3KxIzZcsRaBWT0OA+RUo6gDr69whEMEV NQp/U6JAFp2+481t1CCiOMfbT5O+2U7/vQycl6Uxdt8qe/NeS1SC/D0RzVHvGi625bAG AQ== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2120.oracle.com with ESMTP id 2mnvtu8mb0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 23 Sep 2018 07:39:58 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w8N7dvRh003792 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 23 Sep 2018 07:39:57 GMT Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w8N7duQp019784; Sun, 23 Sep 2018 07:39:56 GMT Received: from santoshs-mbp.lan (/69.181.241.203) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 23 Sep 2018 00:39:56 -0700 Subject: Re: [PATCH v2] RDS: IB: Use DECLARE_PER_CPU_SHARED_ALIGNED for rds_ib_stats To: Nathan Chancellor , "David S. Miller" Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Nick Desaulniers References: <20180923032938.27093-1-natechancellor@gmail.com> From: "santosh.shilimkar@oracle.com" Organization: Oracle Corporation Message-ID: <69796f86-8dfb-0c54-94f3-dfe3cdc8def6@oracle.com> Date: Sun, 23 Sep 2018 00:39:55 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180923032938.27093-1-natechancellor@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9024 signatures=668707 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809230084 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/22/18 8:29 PM, Nathan Chancellor wrote: > Clang warns when two declarations' section attributes don't match. > > net/rds/ib_stats.c:40:1: warning: section does not match previous > declaration [-Wsection] > DEFINE_PER_CPU_SHARED_ALIGNED(struct rds_ib_statistics, rds_ib_stats); > ^ > ./include/linux/percpu-defs.h:142:2: note: expanded from macro > 'DEFINE_PER_CPU_SHARED_ALIGNED' > DEFINE_PER_CPU_SECTION(type, name, > PER_CPU_SHARED_ALIGNED_SECTION) \ > ^ > ./include/linux/percpu-defs.h:93:9: note: expanded from macro > 'DEFINE_PER_CPU_SECTION' > extern __PCPU_ATTRS(sec) __typeof__(type) name; > \ > ^ > ./include/linux/percpu-defs.h:49:26: note: expanded from macro > '__PCPU_ATTRS' > __percpu __attribute__((section(PER_CPU_BASE_SECTION sec))) > \ > ^ > net/rds/ib.h:446:1: note: previous attribute is here > DECLARE_PER_CPU(struct rds_ib_statistics, rds_ib_stats); > ^ > ./include/linux/percpu-defs.h:111:2: note: expanded from macro > 'DECLARE_PER_CPU' > DECLARE_PER_CPU_SECTION(type, name, "") > ^ > ./include/linux/percpu-defs.h:87:9: note: expanded from macro > 'DECLARE_PER_CPU_SECTION' > extern __PCPU_ATTRS(sec) __typeof__(type) name > ^ > ./include/linux/percpu-defs.h:49:26: note: expanded from macro > '__PCPU_ATTRS' > __percpu __attribute__((section(PER_CPU_BASE_SECTION sec))) > \ > ^ > 1 warning generated. > > The initial definition was added in commit ec16227e1414 ("RDS/IB: > Infiniband transport") and the cache aligned definition was added in > commit e6babe4cc4ce ("RDS/IB: Stats and sysctls") right after. The > definition probably should have been updated in net/rds/ib.h, which is > what this patch does. > > Link: https://github.com/ClangBuiltLinux/linux/issues/114 > Signed-off-by: Nathan Chancellor > --- > > v1 -> v2: > > Fix reported build error by using DECLARE instead of DEFINE > Thanks for update !! Acked-by: Santosh shilimkar