Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3149983iog; Mon, 27 Jun 2022 10:08:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vfYqmsXRNrKJoBUepWvan5IDkhqI7FurPnoBrBpT+1BnA+XwqZge0HFyjm1OZ2WzALY356 X-Received: by 2002:a17:902:c2c6:b0:168:d8ce:90b2 with SMTP id c6-20020a170902c2c600b00168d8ce90b2mr15948977pla.110.1656349725251; Mon, 27 Jun 2022 10:08:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656349725; cv=none; d=google.com; s=arc-20160816; b=yTrXeh5WzUJkdKx7yCMmp8A0C2AWX9NUPJBCMOprmU10TRFdGNNZmLjlqyneuxiSDi pvK/WVGh4zviR1uebQjvAC0yCitXCQq0euXrCO4iYLYV+fVMkyK26idKUjEF51CQtdXG X5tu9kcam7rRDMNQu21YIbFz/eKrdA7lrtwwK80OkBs/jlEVo+pQ5DGvhKdpv9ztPzFz YFtMg7J1Zs+W7+c3GTOv+ka6BPcJGW05Bp7S9BolBygLOEr9ozqdyfFtNeCQ1eaN2vC0 rBi6o66TzsNKmHWMmCyPDuW8ekP4P7j8vkeYS5qYRO9hdVbIjFXWxf0uDbwXMoh1RPfJ 3rVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=agTdFC77wAiPKF65qUDFakFqsb81qxDJ3UaD4sEYt/w=; b=GBh3KCfvw1oInkJ7Cn/ZHH/bxJVcu1boaxHGStcSSVXRoAMIOqEr+tFZP3M33hdspQ VlUya7m9jCB7q4buvCyqMV9i0aXVRv0fFDaDReoM8VethU7DNCDuK9nUIx12OgS4URvK Bpo5YwfZZa/1O+zXK8o0r0/XtH4PWK0hsaOZnpUYIN9uQXIdBJH1MP/H1Kpry3/QvvdB bQOrWzdHoQjIf27wv0+4KPhlFQK/iMyPG1/PV1DPJ3YTzL9PZATMwozhz8aP83wgbTdW Uljsqv8AVAxwqfoDgI5o6ppQnaPG08lZZhuzv34B2KSIOlx9qpVFcEC3dhjJ9DmXRwfO Rx+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=IIE+TLwo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y17-20020a056a00191100b00525106ac52fsi12708763pfi.79.2022.06.27.10.08.32; Mon, 27 Jun 2022 10:08:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=IIE+TLwo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239293AbiF0QY4 (ORCPT + 99 others); Mon, 27 Jun 2022 12:24:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237910AbiF0QYz (ORCPT ); Mon, 27 Jun 2022 12:24:55 -0400 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A21D9BE39; Mon, 27 Jun 2022 09:24:54 -0700 (PDT) Received: by mail-pg1-x530.google.com with SMTP id e63so9571186pgc.5; Mon, 27 Jun 2022 09:24:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=agTdFC77wAiPKF65qUDFakFqsb81qxDJ3UaD4sEYt/w=; b=IIE+TLwo/0K9iYZITp/hc6jUuto3k5HhvAD+nsiUisLv5Q4wyvr9FmMjtJYZsH3E9S Wzs6+cVruekXJPSY8wVLoZOU7kIYaO8EcBZqF2+r2+a+Ox3/W+rQ4jWtvvZMN2HM0C5O QzYBRzgRINKohbhhk9bD7Dd1XLJ0A7sx2MfwMjPKt4f6Hjr4DxpWchGyvEsDN9G3Xvde ae3vzMHrE2kgBP93GTa6ag/KAS5mfEFH56yPg1cfYiMM7LnTLOET5S8qHNldYHckM3gS UK+qtGImHgor6rqpZY5chuYnLqBsxZ9FGT/Mgl9qjCMG5++fuTWOmo9eoPb0ODtsjMVK yhBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=agTdFC77wAiPKF65qUDFakFqsb81qxDJ3UaD4sEYt/w=; b=HCn4KS8skzPRWOIUDCIeV1yZyd06mnToGc48CraRjc1pIS3RIBaK6GrunI3VaeQxLo GP1QkK6r1qme+sOOX6YHfCdLsvtx5IZ+dT657K7hBzEDkjD2Ffk8U8HfQxXQiTzq/oNi gVo5vyT8IT0b72HGDm8W2zBRcj0hodA2Z0pRfUrYX0EtzHzfYHAV57tyY7u2Dsiicfoc wpWIrJLgqP7C6O2QPCREAdUw++6NEdFoVvL55olbWeKSJjg2iFhOYyPwM53AGZl2VdAO rZT4DX8ElmJqScNh+cU/tY5i0bgSUmfX47dq83CQg8kRFvTNCMloAFtgGSIP54BwYEn+ iw6g== X-Gm-Message-State: AJIora+NIQG7ibCYlEocUEA8mHXBV5jJlPAg5xLKePU4eqU/mOIdvPEj /Aah2p3NrorM45Nyio9E5q8= X-Received: by 2002:a63:6e44:0:b0:40c:73a7:b6c9 with SMTP id j65-20020a636e44000000b0040c73a7b6c9mr13235895pgc.285.1656347094073; Mon, 27 Jun 2022 09:24:54 -0700 (PDT) Received: from [10.67.48.245] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id t5-20020a17090aae0500b001ec4f258028sm7647327pjq.55.2022.06.27.09.24.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Jun 2022 09:24:53 -0700 (PDT) Message-ID: <7656fa2c-590a-8f0f-03ef-904e4f186c82@gmail.com> Date: Mon, 27 Jun 2022 09:24:51 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH] clk: bcm: rpi: Fix error handling of raspberrypi_fw_get_rate Content-Language: en-US To: Stefan Wahren , Florian Fainelli , Michael Turquette , Stephen Boyd Cc: bcm-kernel-feedback-list@broadcom.com, Maxime Ripard , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20220625083643.4012-1-stefan.wahren@i2se.com> From: Florian Fainelli In-Reply-To: <20220625083643.4012-1-stefan.wahren@i2se.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/25/22 01:36, Stefan Wahren wrote: > The function raspberrypi_fw_get_rate (e.g. used for the recalc_rate > hook) can fail to get the clock rate from the firmware. In this case > we cannot return a signed error value, which would be casted to > unsigned long. Fix this by returning 0 instead. > > Signed-off-by: Stefan Wahren Fixes: 4e85e535e6cc ("clk: bcm283x: add driver interfacing with Raspberry Pi's firmware") Acked-by: Florian Fainelli -- Florian