Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp1452877ybj; Fri, 20 Sep 2019 10:40:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqw4XRhXWtdsjbZ3DwtZ0a9/uuJvuxORTpY1Uhp5kAPDTL3e945fozLG+duFJqUq4gTK/SIk X-Received: by 2002:aa7:d48f:: with SMTP id b15mr23261276edr.159.1569001258138; Fri, 20 Sep 2019 10:40:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569001258; cv=none; d=google.com; s=arc-20160816; b=MkvadyqY1+fMTfaM+z6nY5b4H8DtExuXY0OywHuFe9NZ2lubhymQAA14Rh4nePydyY Z714GpSEHr682xZ3IPF/wMLxwH5z2ccmUZJc8Hg5pE5JENked42pD00OQ6rDoHHJOvT8 lZN6CQ86jimysyVc8CS2Bx4UdFhy0w8JdmKPhpkaXwmUSdYlQqJZMjTJYdH/Kli95VrA IvugsnokJU8Bin6thDVpprYWDcWs3OwlcZvPFWQemxJGIqzmYVwXD9coSZ+D9NcMv5oA KGfZkl9EQn2UURNCx2l38LppjS/HXO1sHJEDV6pWy9HrwAf3nfUd9tJ06+8JzWWYWh26 VMEA== 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=/7v7DniLx9tcNbVApGQTeXXdGqpqeX4Pj6troBXosrk=; b=WHVZdEBciyLQ/QwfOW7b6jbA3eastum3RfWboRtD/bTj5fw+dzEJAJjKmDAAmW21+n CrzryIY7cu4DnvOfOGxqL+4sC8QTFPFMlEcNQK/SulcGsQzRcrcCZUHKgm/cWyCz+niO fX0/04gPxL86s2I8Dk7Jin2V0j0/Gbg4E15MPMwCkDt5H+ea6itOcd1qDBCzjowfc5Vz TM5bMdeRxmhKE4w5oH0E7W8udIjaKdvhQqH+/36lysDlISf5eA1bzDknhBe0W8lQYnD3 B2D75qm2XiiM8GBelUUOCCL1wF8154pR/7kKvABdEpRoVwfZMfba92fOmDdMtnekLU1g z1uA== 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 h28si1858981edh.278.2019.09.20.10.40.33; Fri, 20 Sep 2019 10:40:58 -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 S2395055AbfITHdb (ORCPT + 99 others); Fri, 20 Sep 2019 03:33:31 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:43538 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394985AbfITHdb (ORCPT ); Fri, 20 Sep 2019 03:33:31 -0400 Received: by mail-qt1-f195.google.com with SMTP id c3so7554956qtv.10; Fri, 20 Sep 2019 00:33:30 -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=/7v7DniLx9tcNbVApGQTeXXdGqpqeX4Pj6troBXosrk=; b=r+qWCyLOp2xKbZn1tJ6A/mSFfrkO7Nbl1BPgH0ttCUA818xUZWmpwgSLjuhiWKyeGu VHJxDWsiaoYPKeoWSvc9L1VgKTfOm/nJvNpAD14mQqkcScO5JHjf+J9fE6uecx8WFiz2 pfWmm9betEjQq7Ax9hSxTtpD7OW4EQ+2bLnmcqpFLXinstaKfnvBwDGNTRkCVVlroP9V zcIncGQhi9u9w7FDPMm9NHPrIkn2ah12FOJXtmSUujuaD7eQXR7KTW0X/Hlt+V+B/UKX UNYNCNJGPaEJScvUSTydgHHMmg4Ico/F2bgjr7ajFhtPy6xnJUBa9zTEG+a+HvlRxlnw Tztw== X-Gm-Message-State: APjAAAXHSBvrVRcM4AqhO57mLUe7/WOtszdra8REoYUUPXPLEs/tnMpm JtcvBagm+lCvs4ODJaS8qFLX5apMINi1woZGUWc= X-Received: by 2002:a0c:d084:: with SMTP id z4mr11690320qvg.63.1568964810024; Fri, 20 Sep 2019 00:33:30 -0700 (PDT) MIME-Version: 1.0 References: <1568870297-108679-1-git-send-email-decui@microsoft.com> In-Reply-To: From: Arnd Bergmann Date: Fri, 20 Sep 2019 09:33:13 +0200 Message-ID: Subject: Re: [PATCH] Drivers: hv: vmbus: Fix harmless building warnings without CONFIG_PM To: Dexuan Cui Cc: KY Srinivasan , Haiyang Zhang , Stephen Hemminger , "sashal@kernel.org" , "linux-hyperv@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Michael Kelley 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 Thu, Sep 19, 2019 at 11:38 PM Dexuan Cui wrote: > > Sent: Thursday, September 19, 2019 5:11 AM > > On Thu, Sep 19, 2019 at 7:19 AM Dexuan Cui wrote: > > I think this will still produce a warning if CONFIG_PM is set but > > CONFIG_PM_SLEEP is not, possibly in other configurations as > > well. > > You're correct. Thanks! > > I'll use " #ifdef CONFIG_PM_SLEEP ... #endif" instead. > > The mentioned functions are only used in the micros > SET_NOIRQ_SYSTEM_SLEEP_PM_OPS, which is empty if CONFIG_PM_SLEEP > is not defined. So it looks to me using "#ifdef CONFIG_PM_SLEEP ..." should > resolve the issue. Probably, yes. There are sometimes surprising effects, such as when one of the functions inside of the #ifdef call another function that is otherwise unused. I would normally try to build a few hundred randconfig builds to be fairly sure of a change like this, or use __maybe_unused like most other drivers do here. Arnd