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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5EAE2C00140 for ; Fri, 12 Aug 2022 18:41:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234282AbiHLSlq (ORCPT ); Fri, 12 Aug 2022 14:41:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231237AbiHLSlo (ORCPT ); Fri, 12 Aug 2022 14:41:44 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81B3CAE9D1 for ; Fri, 12 Aug 2022 11:41:33 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id z6so2428781lfu.9 for ; Fri, 12 Aug 2022 11:41:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc; bh=AVMExjC/PZ+IN90kCT2j4IDPkufVZOCe6pOQAghuGnM=; b=kNStvDU4SbWI3BtJsp7e0HJyLYsswIgEe6Q48/DACT6mca2ExpeOlccGEneA2kTZ16 HXHY39V4qcYbCX9Rc8ro9lGLMVijTzNRqlPpRXs40v7YfjmTPxQPwh8DUacWqXaZGjm6 aw9Jf57kGHjCUxnWw6cN7mhWPKhv3PnN2tSCv7iw5chP9U6spmuWnkdTLr/byFdp9zLA UpYHYHlo1fwGZcWUWXwgdUUK0JVAA9yDieXtPUxCIz/+ADJzqf21Ap3RaeUxnAQqqMqE EHozSiOHy4ulFAUpT1XMYAzHWbFjVALkMN4LQGfUIzoBdpaCmgV9kC7RWtW2R9ZA81Ex tfeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=AVMExjC/PZ+IN90kCT2j4IDPkufVZOCe6pOQAghuGnM=; b=E+jp+fL99LhIj3PnN7fjNwzyU3qofEgCk2tChJblSINjxLEMlp9i6bu7L+MEHO/0dl ukm+LTZkpJI8anaGHHGxOQ2uAsxscDNJbPX7SYjt8rfLtnhU9lA6HLz+YFiqGOgfHBwr NWl/OUxhq+VV3zHT6LRZWMAV70WR8XqPAcgcYL8dCmLKnpSJP8MTqmv9Yd7rL2mU0TYZ y06SMVZHkt5UsTGBA1MpKjeIeOlemD2fgv7k4+nq9ryuInX1J7Xa8YJdWmwHyUhuUkJ+ DaWzI/uDatjEKIogMgk5ZpXhsK6Ngg0kflLelnFL6Jb7iVwAY0cbHgwuNi19/YJaLfKg yW/Q== X-Gm-Message-State: ACgBeo0L19lRQoWZ+FdPzdN/14ZE3YByBELe15xBGX6Lx2vxeTX1qbwa /ZX+726Rn8FMQGb17oeOnh2JMQ== X-Google-Smtp-Source: AA6agR5TGMC3pAxFYMqF0pg6wHiqcx21KuEoRtHiCPRcFUtj3sn7nZUcoZK1Ent4J6EwV596ZAGq6Q== X-Received: by 2002:a05:6512:12c9:b0:48b:3e0f:7a79 with SMTP id p9-20020a05651212c900b0048b3e0f7a79mr1772348lfg.52.1660329691834; Fri, 12 Aug 2022 11:41:31 -0700 (PDT) Received: from [192.168.1.39] ([83.146.140.105]) by smtp.gmail.com with ESMTPSA id n26-20020a05651203fa00b0048b0526070fsm300281lfq.71.2022.08.12.11.41.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 Aug 2022 11:41:31 -0700 (PDT) Message-ID: Date: Fri, 12 Aug 2022 21:41:22 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH v3 3/3] memory: Add Broadcom STB memory controller driver Content-Language: en-US To: Florian Fainelli , linux-kernel@vger.kernel.org Cc: Broadcom internal kernel review list , Rob Herring , Krzysztof Kozlowski , "moderated list:BROADCOM BCM7XXX ARM ARCHITECTURE" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" References: <20220801220931.181531-1-f.fainelli@gmail.com> <20220801220931.181531-4-f.fainelli@gmail.com> <26ad247d-a4b3-4051-b8d9-505c09b76f6b@linaro.org> <375eac04-dbfd-080a-3003-cae3eda1f42b@gmail.com> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 12/08/2022 20:52, Florian Fainelli wrote: >>> unless you also implied enclosing those functions under an #if >>> IS_ENABLED(CONFIG_PM) or something which is IMHO less preferable. >> >> Are you sure you added also pm_ptr()? I don't see such warnings with W=1 >> and final object does not have the functions (for a different driver but >> same principle). > > Yes I am sure I added pm_ptr() see the v4 I just submitted. I don't see > how the compiler cannot warn about the functions being unused the day > they stop being referenced by the pm_ops structure which is eliminated? I don't have the answer how it exactly works (or which gcc version introduced it), but I tested it and the functions were not present in the object file, thus of course no warnings. The driver change I am referring to is: https://lore.kernel.org/all/20220808174107.38676-15-paul@crapouillou.net/ I think the only difference against your v4 is: DEFINE_SIMPLE_DEV_PM_OPS and lack of __maybe_unused on the functions. The DEFINE_SIMPLE_DEV_PM_OPS itself adds __maybe_unused for !CONFIG_PM case, but I don't think it is relevant. Best regards, Krzysztof