Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp766728img; Fri, 22 Mar 2019 08:09:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqyNtx9cRwJQvj3t2+gI+5akgLl2WDMTv0wyKBWLJDx25tIatOMKpqHqORNBz4RDgLj051EV X-Received: by 2002:a17:902:a512:: with SMTP id s18mr1518864plq.185.1553267351801; Fri, 22 Mar 2019 08:09:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553267351; cv=none; d=google.com; s=arc-20160816; b=e06NkjQ8VE8/DOG1jQd0YDg9FQm18TFqe2+fF4uMSGXI3HD/H9i+82562FjQ3oh3rQ uV0Id07t/LTA0opITPBqP+7Vvx2w7RQFpWYbsTnWcv/LQ+J+vfrd8SNKyEQ9KqGFkTtE DKJ2zO+9p1r7w3njOahuvJyOcKEPDDrHU2ynxCuoNq/EMph+7TD1wcfs2/dP6VGij/Os boUh1wDwE31B2X+zoH3J3v4F4bxVuEIYbtl2YIZFkzONkPNPfp89zmJTkdtCHglztvfQ VuRQ3MxTAfowlrMKmRTJgal59rSal/F+0auppnVrA7jyauRlhHly5PfyI37mCDFbGH1n 6vZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=ray6a3oBz8Eivrw+X+ERFR/qqf3R27iqqoHid6iCv2g=; b=EswnsSijHtfFpbJ7b7U9ew7GYmweiUWdyl07dKUHI1PKNdRUClg4lWmh/EO9HnTOWw z1XTwhiRjO6OHgpOKTQLJ/NASuts3x69w/PluKEJYmvrp3KYgZL3k5z7Nl6Q789u7YES +mMhN7MD7xozzKaa4mEJCMDm6ib00JvntGKjrDGmYAupPmenqXJr5HK2ammBanwziz9W nYPws0OquF24Lg6yri4hPC9cA2Qr/jG2HZEluYtV70yXWHEw1/VYxxMWAGoBIlwheePC KOou81Ozz6aINEP7JHjDngz0aQ1Ejx2kUZRN9HI7DT2289Q0uqCCRvG63twUDAKpOthh vcMw== 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 d22si6772299pgi.166.2019.03.22.08.08.54; Fri, 22 Mar 2019 08:09:11 -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 S1726621AbfCVPIJ (ORCPT + 99 others); Fri, 22 Mar 2019 11:08:09 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:34434 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725981AbfCVPII (ORCPT ); Fri, 22 Mar 2019 11:08:08 -0400 Received: by mail-qt1-f193.google.com with SMTP id k2so2893532qtm.1; Fri, 22 Mar 2019 08:08:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ray6a3oBz8Eivrw+X+ERFR/qqf3R27iqqoHid6iCv2g=; b=cb18/CkB9NaNUi5d0Nkp/re/8u0i/exNkDmTi0bdpsGj6oT9dQ8UzjgDLX+jfTn+kl 2IacXJxOg5pxMoITGFmSS8yBRMtWEU49UiWR/WR0O94W+zq7S+mmO0v24BKLaVZ6UK03 4gx5e6f/zYU4v+8ITGywxX7etthAwf/mSTR2t4P8hNBMy3ao255wEPD2G5DGNT8NxsAz nG3aDXFn1XOAMNt+/ltfUQ8jsPtI83RqSerE2wvmTI0THf9hPvqXDbHs+inxcVScMVA4 +76OYivXano9OEzHuDFpa84pyGwGQIp5WpTPUKmJ6nyIPrs2KfByAPXi67j+bUV0p1ly c7dg== X-Gm-Message-State: APjAAAVAlDtvKAqQsbLcxy/d1YEGZPfqDLzxXWuNYBCya/d0JLcAUW/s a4XZmHch3JpgKwKf707PZ1/l6tF+tngTqoKmVKs= X-Received: by 2002:aed:3b09:: with SMTP id p9mr8562803qte.152.1553267287421; Fri, 22 Mar 2019 08:08:07 -0700 (PDT) MIME-Version: 1.0 References: <20190322140819.300740-1-arnd@arndb.de> In-Reply-To: From: Arnd Bergmann Date: Fri, 22 Mar 2019 16:07:50 +0100 Message-ID: Subject: Re: [PATCH] ceph: fix clang warning for CEPH_DEFINE_OID_ONSTACK To: Ilya Dryomov Cc: "Yan, Zheng" , Sage Weil , clang-built-linux@googlegroups.com, Nick Desaulniers , Nathan Chancellor , Alex Elder , Ceph Development , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 22, 2019 at 3:40 PM Ilya Dryomov wrote: > > On Fri, Mar 22, 2019 at 3:08 PM Arnd Bergmann wrote: > > Hi Arnd, > > I don't like this because the initialization is no longer contained to > ceph_oid_init(). Now there are two things to patch instead of one. > > How is this going to be fixed in other places? The only other warning like this that I encountered was in DECLARE_WAIT_QUEUE_HEAD_ONSTACK(). So far, I have no idea for how to solve it, other than disabling CONFIG_LOCKDEP when clang is used. Would you prefer this version? #define CEPH_OID_INITIALIZER(oid) { .name = (oid).inline_name } #define CEPH_DEFINE_OID_ONSTACK(oid) \ struct ceph_object_id oid = CEPH_OID_INITIALIZER(oid) static inline void ceph_oid_init(struct ceph_object_id *oid) { *oid = (struct ceph_object_id)CEPH_OID_INITIALIZER(*oid); } Arnd