Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp733811pxb; Thu, 5 Nov 2020 11:30:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJwnVdDzhKu5GE5Nu0SD5dZicaiSVbIxjw670QyH6Tt+EXhW+DMprsQ1VTJhmMKIGXGJLgkh X-Received: by 2002:a17:906:c206:: with SMTP id d6mr3724046ejz.239.1604604607583; Thu, 05 Nov 2020 11:30:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604604607; cv=none; d=google.com; s=arc-20160816; b=p0r/k9jcM8xHlBZY+CEZq1I6IXgMUyOY/NrKJTL6e8ZXHQQP7vNi37aZuWNMhzl5Of V1zgtVTfzGYZAyWqFx9jKPlRcStzxs0GttAQVkrociMk+vxBrUn+Q0/Gdq3IV29LWbX5 kzc9nzBstSs2ZZedKHm3DCrRR7wVJSbmDrhMxnxdrgwfj97vBxL+LF2qXh4IMXTwpZNr zBOVXC6cALO5HBgMbkh4y7KNULRwJ9WByw68ZYk8NHCjL7bhe1uh6faT9Hw9TpiAMsEg AQcDtx3mKafbczTJ7O3rdow3RgVqihl6zO1C6+4zetQwB464W3cpZKAv6sm9PpPYwePV wxYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=dAO1k8shf68doDFmXyycUXIsrwSrkRmTRsSK1muZhAo=; b=AbCNnjU2cfedA9ofqqz6MUi6u/5yGD7J8t/bKn3e6qv1ECraPRDS0IENYWGqwRv5r0 HoKajEsIrhNqBZnbMK9D2IW4AYsKK0CLQs9WKJOqp2HBbBOWYx/M1UuYKfvFJC9ITqpB jnne1cuafLeP4SmP1tLxoEpXHCrBqDUMMCgfx27XRQZgEWp1g+vSBN/w4nGFPsrywCkx EaA2D954x/8pKbG08hgLry7GGPWmmtFJM7Nj+84um9jfxmjfpWtNzjUpHvRddRU7XwYj 3SbKI6T40HldXkUPdWG8Mfa1lGorajZB2FHZULTQYy/t2aKYl5yoGZAlIELxlIdgVvKj EA7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t16si1975339edv.371.2020.11.05.11.29.44; Thu, 05 Nov 2020 11:30:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732129AbgKETZ4 (ORCPT + 99 others); Thu, 5 Nov 2020 14:25:56 -0500 Received: from jabberwock.ucw.cz ([46.255.230.98]:54926 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726729AbgKETZ4 (ORCPT ); Thu, 5 Nov 2020 14:25:56 -0500 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 0A6AC1C0B82; Thu, 5 Nov 2020 20:25:54 +0100 (CET) Date: Thu, 5 Nov 2020 20:25:53 +0100 From: Pavel Machek To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Bartosz Golaszewski , Alexandre Belloni Subject: Re: [PATCH 4.19 178/191] rtc: rx8010: dont modify the global rtc ops Message-ID: <20201105192553.GB18462@duo.ucw.cz> References: <20201103203232.656475008@linuxfoundation.org> <20201103203249.312789260@linuxfoundation.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EuxKj2iCbKjpUGkD" Content-Disposition: inline In-Reply-To: <20201103203249.312789260@linuxfoundation.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --EuxKj2iCbKjpUGkD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > commit d3b14296da69adb7825022f3224ac6137eb30abf upstream. >=20 > The way the driver is implemented is buggy for the (admittedly unlikely) > use case where there are two RTCs with one having an interrupt configured > and the second not. This is caused by the fact that we use a global > rtc_class_ops struct which we modify depending on whether the irq number > is present or not. While this fixes very unlikely configuration with two RTCs... > Fix it by using two const ops structs with and without alarm operations. > While at it: not being able to request a configured interrupt is an error > so don't ignore it and bail out of probe(). =2E..it contains unrelated changes and in particular will break operation when IRQ can not be requested. I don't believe we need it in -stable. Best regards, Pavel > @@ -468,16 +478,16 @@ static int rx8010_probe(struct i2c_clien > =20 > if (err) { > dev_err(&client->dev, "unable to request IRQ\n"); > - client->irq =3D 0; > - } else { > - rx8010_rtc_ops.read_alarm =3D rx8010_read_alarm; > - rx8010_rtc_ops.set_alarm =3D rx8010_set_alarm; > - rx8010_rtc_ops.alarm_irq_enable =3D rx8010_alarm_irq_enable; > + return err; > } --=20 http://www.livejournal.com/~pavelmachek --EuxKj2iCbKjpUGkD Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCX6RRwQAKCRAw5/Bqldv6 8kK2AJsEW9B2Z6krorpL4FmqyDKN92TYhwCdFMkHcRX9J6Lo8fWTD3/nhUaPWsU= =qjbV -----END PGP SIGNATURE----- --EuxKj2iCbKjpUGkD--