Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1410353ybn; Wed, 25 Sep 2019 18:00:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqyYxkWGO860GT71rieJhGrd+SslUOIDfaJ9aerUlTMaYi7ksc0QfPw2UAy/cRepWItnRzaH X-Received: by 2002:a50:da44:: with SMTP id a4mr926942edk.120.1569459620288; Wed, 25 Sep 2019 18:00:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569459620; cv=none; d=google.com; s=arc-20160816; b=AHTYu00s1VyQXIvXRmvZ6MTMUtvrqHuL+NPQMNQvT1p+EG+SesZF8abfBuefpONyBZ 3FimBhdsTpLz4rRAvsZblqHLKa66hnDuYtx5YAe9ytmWAWvejL2F4apvXKQwRkI0EVEG 3GE2r9kZl/7wY725HcgrPhKJT593WWSLSifPsmtSWj8tJpgDnShlDPGXjCBcVbW38BnL LtP1YdwOaKO3s7NuYWzbMsOu+bItW1SxKA2S72688IxbIjStRyeWXBi+9HQFUKmRbzgw JXyRBlwsH7HrrA7hY1L0SSbQgWC4l29TxPVAOv9En9oN2jJM9GuD1StleBMhUZvKcAFD aZag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=66YIyMdBjRcYeXmfu7lPRJ1TuBxQokA7OexMBUqGK3I=; b=YXRECH2ViYEYWbiXLTXALEGfoLGweoXjSkrfehlNZvJYGuBKKMX8oFA3S8GqXiuRDN 2Sh/hrklgTr2YKmMOq8xyl+jxjXwcJKzv2HNS17kG+7CHsXY2lxFgrcO5PAr6iJsRlFZ VLOOr5HwORWuEaw1Rv477rK3jMS7i86v8yvRS5WzD435KDxZRCauuCa1/1UHMirDMijb 78M2Vc+tXSoKxUL/81tO5WWJON1+JH5gjzvytCJEBMN3jLIoSzRJqhQWb/1H4Lbuz7bb RDAqOfly8ihtdNptDTBYnG4V25Rn7a6MTXXy4mRFuFChzJBN/8G1WeGHh+33SLz5R8Al nqNQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y23si389758edb.208.2019.09.25.17.59.57; Wed, 25 Sep 2019 18:00:20 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2504295AbfIXJjf (ORCPT + 99 others); Tue, 24 Sep 2019 05:39:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60726 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726260AbfIXJjf (ORCPT ); Tue, 24 Sep 2019 05:39:35 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D7733315C030; Tue, 24 Sep 2019 09:39:34 +0000 (UTC) Received: from bfoster (dhcp-41-2.bos.redhat.com [10.18.41.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 57CF55C1B2; Tue, 24 Sep 2019 09:39:34 +0000 (UTC) Date: Tue, 24 Sep 2019 05:39:32 -0400 From: Brian Foster To: Austin Kim Cc: darrick.wong@oracle.com, linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] xfs: avoid unused to_mp() function warning Message-ID: <20190924093932.GB13820@bfoster> References: <20190924085350.GA75425@LGEARND20B15> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190924085350.GA75425@LGEARND20B15> User-Agent: Mutt/1.12.1 (2019-06-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Tue, 24 Sep 2019 09:39:34 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 24, 2019 at 05:53:50PM +0900, Austin Kim wrote: > to_mp() was first introduced with the following commit: > 'commit 801cc4e17a34c ("xfs: debug mode forced buffered write failure")' > > But the user of to_mp() was removed by below commit: > 'commit f8c47250ba46e ("xfs: convert drop_writes to use the errortag > mechanism")' > > So kernel build with clang throws below warning message: > > fs/xfs/xfs_sysfs.c:72:1: warning: unused function 'to_mp' [-Wunused-function] > to_mp(struct kobject *kobject) > > Hence to_mp() might be removed safely to get rid of warning message. > > Signed-off-by: Austin Kim > --- Reviewed-by: Brian Foster > fs/xfs/xfs_sysfs.c | 13 ------------- > 1 file changed, 13 deletions(-) > > diff --git a/fs/xfs/xfs_sysfs.c b/fs/xfs/xfs_sysfs.c > index ddd0bf7..f1bc88f 100644 > --- a/fs/xfs/xfs_sysfs.c > +++ b/fs/xfs/xfs_sysfs.c > @@ -63,19 +63,6 @@ static const struct sysfs_ops xfs_sysfs_ops = { > .store = xfs_sysfs_object_store, > }; > > -/* > - * xfs_mount kobject. The mp kobject also serves as the per-mount parent object > - * that is identified by the fsname under sysfs. > - */ > - > -static inline struct xfs_mount * > -to_mp(struct kobject *kobject) > -{ > - struct xfs_kobj *kobj = to_kobj(kobject); > - > - return container_of(kobj, struct xfs_mount, m_kobj); > -} > - > static struct attribute *xfs_mp_attrs[] = { > NULL, > }; > -- > 2.6.2 >