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=-5.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 39383C433F5 for ; Thu, 23 Sep 2021 16:57:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EAFFF6105A for ; Thu, 23 Sep 2021 16:57:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org EAFFF6105A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LSAEKVGP5FEZT1FTR8L1scDTvIzZX+lmXNFqUv67wKI=; b=sHx8mt4zRpoi2t yuDiE2Aa/0FDbIHayG00uEohF/FGvlrUOhQMkJi7Xf9iU83Ql/uQ3DK8sMMEriFgLIbJGdKRfd01W TZo8pJHbTRAeIa0Kqhad9idnVNHdsJTD/qRvBIaK2my1cjq8RxvbWoSncc1d946Xpwyhv+c90U8I4 11KD4ZezB73Kh7LCHMfXDV/rgATaQEfLMQ1syBpZ29HiPdEGooVVnjoFlM4kwGK0154f/RBo2xFli GCJqyCaJ5M+eLXOiE/XWDnmollhrMgNLGVcjKRtfZMFRL2MIT8HQ7B3UatIqShxgbJALSq0OzYrIy YPpUaKHC1Y4ydUFuntTw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mTS06-00CBk0-D1; Thu, 23 Sep 2021 16:55:10 +0000 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mTRzQ-00CBa5-CL for linux-arm-kernel@lists.infradead.org; Thu, 23 Sep 2021 16:54:29 +0000 Received: by mail-lf1-x136.google.com with SMTP id y28so28529908lfb.0 for ; Thu, 23 Sep 2021 09:54:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gPVfIkojk+VtFJMen4+cGsBeD1tfgJy2uH8GJj5f9Vc=; b=OfqEhcbEZhkiKLCtxXhitQy1QLUs0XenQlnJLKTA0DhdRZ0A1+CrR153GTkwzeqhaN /O4bKj3bRKw/Drwkiqo+b0m1N74ouM8S4xM7/SbJrwJE7wpzJ5Bo6/f5wAcw2zIbcHXq Qy3C7/bgdFaT9SsS+62thqimK08Qa5PEn8JGc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gPVfIkojk+VtFJMen4+cGsBeD1tfgJy2uH8GJj5f9Vc=; b=grlkaGPGNEan/Oa3lYm9O+GQQWv6Xot5xF2dvmUW748ldEICOc0OZn9llj8JzZv65G Vw7qZrdAmvkF0o4DXkmbKS0/vYxfi5SNaeOrLTqn5HcaxqUXXjJIupudtdPjIEKeXVek LCuIjkhrbbqiFq/c9f9QMkrbJBPVI6MjJTzcxe6E/Iasl6vH3yTBNrCQqX+7SIVuhi+f obr+JCNpsH4DVXiUgGaU6nepNUMQSyPlGaSbrmYkfrO7H+yPglv/ONFzyhiTyVbgUnTE bPNORAIp3DymaR2+iw/HaJqI7owN9H3bJwptNsguB6uG6nQlYDzYImD4xiD3wHQceEyG apww== X-Gm-Message-State: AOAM530Q9QYeAP1WYQ2SZV2xHV+ArgKY0NL/Iwet0B8qI+FJubMXZqSv MXXIrUBw1fj6JcggoAzShif5buwbUb6Bt2WHf+I= X-Google-Smtp-Source: ABdhPJx83gcADszs8/31aaT+E9RUCcWTtOs6NQb+Jo+V7Y1DxIZ+uZKxptZYR+ZUnf3BrK+52aZIoA== X-Received: by 2002:ac2:4c4e:: with SMTP id o14mr5385295lfk.482.1632416064180; Thu, 23 Sep 2021 09:54:24 -0700 (PDT) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com. [209.85.167.47]) by smtp.gmail.com with ESMTPSA id k19sm647754ljn.97.2021.09.23.09.54.22 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Sep 2021 09:54:23 -0700 (PDT) Received: by mail-lf1-f47.google.com with SMTP id e15so28863702lfr.10 for ; Thu, 23 Sep 2021 09:54:22 -0700 (PDT) X-Received: by 2002:a05:6512:3d29:: with SMTP id d41mr5000364lfv.474.1632416062538; Thu, 23 Sep 2021 09:54:22 -0700 (PDT) MIME-Version: 1.0 References: <20210923155728.703312-1-maxime@cerno.tech> In-Reply-To: <20210923155728.703312-1-maxime@cerno.tech> From: Linus Torvalds Date: Thu, 23 Sep 2021 09:54:06 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] drm/vc4: hdmi: Fix defined but not used warning To: Maxime Ripard Cc: Maarten Lankhorst , Thomas Zimmermann , Daniel Vetter , David Airlie , linux-rpi-kernel@lists.infradead.org, Florian Fainelli , Nicolas Saenz Julienne , Linux ARM , Nathan Chancellor , Randy Dunlap , Stephen Rothwell X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210923_095428_468219_DEE55B68 X-CRM114-Status: GOOD ( 15.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Sep 23, 2021 at 8:57 AM Maxime Ripard wrote: > > Since we select CONFIG_PM anyway, vc4_hdmi_runtime_suspend() and > vc4_hdmi_runtime_suspend() will always be used and we can thus always > assign them in struct dev_pm_ops without using the SET_RUNTIME_PM_OPS > macro. This cannot be true. If CONFIG_PM is always enabled, then the patch is a no-op, and the warning you quote cannot happen: warning: 'vc4_hdmi_runtime_suspend' defined but not used [-Wunused-function] So this patch is very obviously broken, the message is misleading, and the claims in your commit message cannot _possibly_ be true. Maxime, this kind of "respond to bug reports with random contents" most not continue. You need to actually look at what the reporter is reporting, and think about the code. Because the above fix is broken, broken, broken. The way people fix this is by either making the function definitions be conditional on their uses - so that the compiler removes them entirely - or mark them as __maybe_unused. Then a smart _linker_ can actually remove the code if people use the smarter linker options. But responding with a patch that claims something that clearly isn't true is not a valid response. Linus _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel