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=-3.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS 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 D1475C33CB1 for ; Sun, 19 Jan 2020 16:15:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3919520678 for ; Sun, 19 Jan 2020 16:15:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gerhold.net header.i=@gerhold.net header.b="WaZvM3CJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726860AbgASQPs (ORCPT ); Sun, 19 Jan 2020 11:15:48 -0500 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.218]:11601 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726778AbgASQPs (ORCPT ); Sun, 19 Jan 2020 11:15:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1579450542; s=strato-dkim-0002; d=gerhold.net; h=In-Reply-To:References:Message-ID:Subject:Cc:To:From:Date: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=cPvf6/AOLUcJm+qbXVbmUeUtUDTK5kCasZuDwU/9jWo=; b=WaZvM3CJv+eW2KoALcmr2attaExzzg4pX5P006usfP8Fhx1TSuTC3ChzKqwHJErxlw Phojewc0tfsXoDyoklC3qRTaJSpjakd0a4xHXwattJMsGfA6dNxfIEL56H6d6KptQ+ZR SymKsjFdalNYN6no2U+CIT/Sa+/isAXyVQl5+PAXvhZON6qRSZ/lLqSdTnsR+PkD6kTJ DRx+tSKu4R4XdHZp/AJrnmWgMie0/7J7Y1MbpS3hCrYafkkw85lwVoI/C1EADcroB7nV CkFcKU+EdidqV8+r6RIl/cUIcnKtge3EdBFLz/P8/v8/+4CQrpuNOwIA4T45zo63bEtp dP3A== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQ/OcYgojyw4j34+u266EZF6ORJAS+MuXEVD" X-RZG-CLASS-ID: mo00 Received: from gerhold.net by smtp.strato.de (RZmta 46.1.4 AUTH) with ESMTPSA id h048a6w0JGFdvSG (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Sun, 19 Jan 2020 17:15:39 +0100 (CET) Date: Sun, 19 Jan 2020 17:15:33 +0100 From: Stephan Gerhold To: Sasha Levin Cc: gregkh@linuxfoundation.org, Jonathan.Cameron@huawei.com, lorenzo@kernel.org, stable@vger.kernel.org Subject: Re: FAILED: patch "[PATCH] iio: imu: st_lsm6dsx: Fix selection of ST_LSM6DS3_ID" failed to apply to 4.19-stable tree Message-ID: <20200119161533.GA143951@gerhold.net> References: <1579440810243255@kroah.com> <20200119153253.GP1706@sasha-vm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200119153253.GP1706@sasha-vm> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Sun, Jan 19, 2020 at 10:32:53AM -0500, Sasha Levin wrote: > On Sun, Jan 19, 2020 at 02:33:30PM +0100, gregkh@linuxfoundation.org wrote: > > > > The patch below does not apply to the 4.19-stable tree. > > If someone wants it applied there, or to any other stable or longterm > > tree, then please email the backport, including the original git commit > > id to . > > > > thanks, > > > > greg k-h > > > > ------------------ original commit in Linus's tree ------------------ > > > > From fb4fbc8904e786537e29329d791147389e1465a2 Mon Sep 17 00:00:00 2001 > > From: Stephan Gerhold > > Date: Mon, 16 Dec 2019 13:41:20 +0100 > > Subject: [PATCH] iio: imu: st_lsm6dsx: Fix selection of ST_LSM6DS3_ID > > > > At the moment, attempting to probe a device with ST_LSM6DS3_ID > > (e.g. using the st,lsm6ds3 compatible) fails with: > > > > st_lsm6dsx_i2c 1-006b: unsupported whoami [69] > > > > ... even though 0x69 is the whoami listed for ST_LSM6DS3_ID. > > > > This happens because st_lsm6dsx_check_whoami() also attempts > > to match unspecified (zero-initialized) entries in the "id" array. > > ST_LSM6DS3_ID = 0 will therefore match any entry in > > st_lsm6dsx_sensor_settings (here: the first), because none of them > > actually have all 12 entries listed in the "id" array. > > > > Avoid this by additionally checking if "name" is set, > > which is only set for valid entries in the "id" array. > > > > Note: Although the problem was introduced earlier it did not surface until > > commit 52f4b1f19679 ("iio: imu: st_lsm6dsx: add support for accel/gyro unit of lsm9ds1") > > because ST_LSM6DS3_ID was the first entry in st_lsm6dsx_sensor_settings. > > > > Fixes: d068e4a0f921 ("iio: imu: st_lsm6dsx: add support to multiple devices with the same settings") > > Cc: # 5.4 > > Acked-by: Lorenzo Bianconi > > Signed-off-by: Stephan Gerhold > > Signed-off-by: Jonathan Cameron > > Signed-off-by: Greg Kroah-Hartman > > I don't think that this is needed on anything older than 5.4 because > they don't have 801a6e0af0c6 ("iio: imu: st_lsm6dsx: add support to > LSM6DSO"), the fixes tag might be misleading here a bit. Correct. I didn't want to use 801a6e0af0c6 ("iio: imu: st_lsm6dsx: add support to LSM6DSO") as Fixes tag because that commit did not do anything wrong - the problem was introduced earlier, but there is no way to trigger it on older kernels. This is why I added # 5.5 to the Cc: stable tag. Are these comments still used in any way? Or is there a better way to encode this into the commit message? Thanks, Stephan