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=-13.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=ham 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 D9B1CC54E8B for ; Sun, 10 May 2020 09:55:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B6B79218AC for ; Sun, 10 May 2020 09:55:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589104500; bh=WCYLSWELOl5503jWmGXNWKpfN+YMAYKt7Zqg+oA686U=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=RjqOqMKGIFs9DOJv/+hCz1Nz34U5jgINGufq6QNP780RsdRehfQVnM1/KDNA/q4dS tdDbsbNim2mlCBH/ymLQM1jxOuBmyeqPbLeXxT/kWuXz8VeUxi8Ae+fo04Ouquyxs9 CSjDo654M0Z3Dx1lJ4vDwmOMtTNfEYG6xq5O+ppQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728301AbgEJJzA (ORCPT ); Sun, 10 May 2020 05:55:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:57638 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725839AbgEJJy7 (ORCPT ); Sun, 10 May 2020 05:54:59 -0400 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E678620820; Sun, 10 May 2020 09:54:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589104499; bh=WCYLSWELOl5503jWmGXNWKpfN+YMAYKt7Zqg+oA686U=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=dh+ow8ga68Axs1mr7S69RxJG+0bm4MW+IgzCSoEZ3voK8GCKVzIg37rwLqTfcdWW+ lxx/+fwSR9DsHC4icAvHlOeAFyW9OtcZhuBBipHZHVHUrBc7EsvVwPRxoJ6Z8nE6EZ JDV2GC+YSDLs3krDtXmbakNKg9DvhC/5p96VQHuE= Date: Sun, 10 May 2020 10:54:54 +0100 From: Jonathan Cameron To: Jonathan Cameron Cc: Marion & Christophe JAILLET , Andy Shevchenko , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald , "Enrico Weigelt, metux IT consult" , Greg Kroah-Hartman , Dan Carpenter , Thomas Gleixner , linux-iio , Linux Kernel Mailing List , Subject: Re: [PATCH] iio: sca3000: Remove an erroneous 'get_device()' Message-ID: <20200510105454.505c5d1c@archlinux> In-Reply-To: <20200508140221.0000018d@Huawei.com> References: <20200506035206.192173-1-christophe.jaillet@wanadoo.fr> <0a8cd600-2b21-2076-1355-8c97d7ceb709@wanadoo.fr> <20200508140221.0000018d@Huawei.com> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 8 May 2020 14:02:21 +0100 Jonathan Cameron wrote: > On Wed, 6 May 2020 19:31:38 +0200 > Marion & Christophe JAILLET wrote: >=20 > > Le 06/05/2020 =C3=A0 12:38, Andy Shevchenko a =C3=A9crit=C2=A0: =20 > > > On Wed, May 6, 2020 at 6:55 AM Christophe JAILLET > > > wrote: =20 > > >> This looks really unusual to have a 'get_device()' hidden in a 'dev_= err()' > > >> call. > > >> Remove it. > > >> > > >> While at it add a missing \n at the end of the message. > > >> =20 > > > It should have Fixes tag because it is a quite an issue (get_device() > > > breaks reference counting with all problems we may expect). =20 > >=20 > > Agreed and I usually do, but here, I've lost track when this driver has= =20 > > gone out of staging. > >=20 > > Based on: > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log= /drivers/iio/accel/sca3000.c > > The issue was already there on 2016/10/23, but when I try to go one ste= p=20 > > further: > >=20 > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tre= e/drivers/staging/iio/accel/sca3000.c?id=3D2ccf61442ff142d2dde7c47471c2798a= 4d78b0ad > > ^^^^ =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^^^^^^^ > > works but if I try to see the log for that: > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log= /drivers/staging/iio/accel/sca3000.c > > ^^^=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^^^^^^^ > > is empty. > >=20 > > Most of the time, when I do it like that it works just fine, but not on= =20 > > this file. =20 >=20 > Oddity of the web interface. Edit the url to get a log form a commit >=20 > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/d= rivers/staging/iio/accel/sca3000.c?id=3D2ccf61442ff142d2dde7c47471c2798a4d7= 8b0ad > ^^^ > Then for more fun you have to deal with another rename > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi= t/drivers/staging/iio/accel/?id=3Dced5c03d360aeebaac6faa7dd8d6d0a77733ab16 >=20 > Next bit of log... > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/d= rivers/staging/iio/accel/sca3000_ring.c?id=3Dced5c03d360aeebaac6faa7dd8d6d0= a77733ab16=20 >=20 > It goes all the way.. >=20 > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi= t/drivers/staging/iio/accel/sca3000_core.c?id=3D574fb258d63658e4564c32c1940= 068a3bad666a0 >=20 > Fixes: 574fb258d636 ("Staging: IIO: VTI sca3000 series accelerometer driv= er (spi)") >=20 > Which was in the initial IIO patch set nearly 11 years ago in the merge w= indow for 2.6.32. >=20 > What can I say - I was young and just as capable of writing dumb bugs as = I am today :) >=20 > I'll get this queued up when I'm on the right computer... Applied to the fixes-togreg branch of iio.git. Thanks, Jonathan >=20 > Thanks, >=20 > Jonathan >=20 >=20 > >=20 > > Any other way to navigate in history of moved file would be appreciated. > >=20 > > CJ > > =20 > > > =20 > > >> Signed-off-by: Christophe JAILLET > > >> --- > > >> This patch is purely speculative. > > >> I've looked a bit arround and see no point for this get_device() but= other > > >> eyes are welcomed :) > > >> --- > > >> drivers/iio/accel/sca3000.c | 2 +- > > >> 1 file changed, 1 insertion(+), 1 deletion(-) > > >> > > >> diff --git a/drivers/iio/accel/sca3000.c b/drivers/iio/accel/sca3000= .c > > >> index 66d768d971e1..6e429072e44a 100644 > > >> --- a/drivers/iio/accel/sca3000.c > > >> +++ b/drivers/iio/accel/sca3000.c > > >> @@ -980,7 +980,7 @@ static int sca3000_read_data(struct sca3000_stat= e *st, > > >> st->tx[0] =3D SCA3000_READ_REG(reg_address_high); > > >> ret =3D spi_sync_transfer(st->us, xfer, ARRAY_SIZE(xfer)); > > >> if (ret) { > > >> - dev_err(get_device(&st->us->dev), "problem reading r= egister"); > > >> + dev_err(&st->us->dev, "problem reading register\n"); > > >> return ret; > > >> } > > >> > > >> -- > > >> 2.25.1 > > >> =20 > > > =20 >=20 >=20 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Cameron Date: Sun, 10 May 2020 09:54:54 +0000 Subject: Re: [PATCH] iio: sca3000: Remove an erroneous 'get_device()' Message-Id: <20200510105454.505c5d1c@archlinux> List-Id: References: <20200506035206.192173-1-christophe.jaillet@wanadoo.fr> <0a8cd600-2b21-2076-1355-8c97d7ceb709@wanadoo.fr> <20200508140221.0000018d@Huawei.com> In-Reply-To: <20200508140221.0000018d@Huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: Jonathan Cameron Cc: Marion & Christophe JAILLET , Andy Shevchenko , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald , "Enrico Weigelt, metux IT consult" , Greg Kroah-Hartman , Dan Carpenter , Thomas Gleixner , linux-iio , Linux Kernel Mailing List , kernel-janitors@vger.kernel.org On Fri, 8 May 2020 14:02:21 +0100 Jonathan Cameron wrote: > On Wed, 6 May 2020 19:31:38 +0200 > Marion & Christophe JAILLET wrote: > > > Le 06/05/2020 à 12:38, Andy Shevchenko a écrit : > > > On Wed, May 6, 2020 at 6:55 AM Christophe JAILLET > > > wrote: > > >> This looks really unusual to have a 'get_device()' hidden in a 'dev_err()' > > >> call. > > >> Remove it. > > >> > > >> While at it add a missing \n at the end of the message. > > >> > > > It should have Fixes tag because it is a quite an issue (get_device() > > > breaks reference counting with all problems we may expect). > > > > Agreed and I usually do, but here, I've lost track when this driver has > > gone out of staging. > > > > Based on: > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/drivers/iio/accel/sca3000.c > > The issue was already there on 2016/10/23, but when I try to go one step > > further: > > > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/staging/iio/accel/sca3000.c?id=2ccf61442ff142d2dde7c47471c2798a4d78b0ad > > ^^^^         ^^^^^^^ > > works but if I try to see the log for that: > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/drivers/staging/iio/accel/sca3000.c > > ^^^         ^^^^^^^ > > is empty. > > > > Most of the time, when I do it like that it works just fine, but not on > > this file. > > Oddity of the web interface. Edit the url to get a log form a commit > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/drivers/staging/iio/accel/sca3000.c?id=2ccf61442ff142d2dde7c47471c2798a4d78b0ad > ^^^ > Then for more fun you have to deal with another rename > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/staging/iio/accel/?id=ced5c03d360aeebaac6faa7dd8d6d0a77733ab16 > > Next bit of log... > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/drivers/staging/iio/accel/sca3000_ring.c?id=ced5c03d360aeebaac6faa7dd8d6d0a77733ab16 > > It goes all the way.. > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/staging/iio/accel/sca3000_core.c?id=574fb258d63658e4564c32c1940068a3bad666a0 > > Fixes: 574fb258d636 ("Staging: IIO: VTI sca3000 series accelerometer driver (spi)") > > Which was in the initial IIO patch set nearly 11 years ago in the merge window for 2.6.32. > > What can I say - I was young and just as capable of writing dumb bugs as I am today :) > > I'll get this queued up when I'm on the right computer... Applied to the fixes-togreg branch of iio.git. Thanks, Jonathan > > Thanks, > > Jonathan > > > > > > Any other way to navigate in history of moved file would be appreciated. > > > > CJ > > > > > > > >> Signed-off-by: Christophe JAILLET > > >> --- > > >> This patch is purely speculative. > > >> I've looked a bit arround and see no point for this get_device() but other > > >> eyes are welcomed :) > > >> --- > > >> drivers/iio/accel/sca3000.c | 2 +- > > >> 1 file changed, 1 insertion(+), 1 deletion(-) > > >> > > >> diff --git a/drivers/iio/accel/sca3000.c b/drivers/iio/accel/sca3000.c > > >> index 66d768d971e1..6e429072e44a 100644 > > >> --- a/drivers/iio/accel/sca3000.c > > >> +++ b/drivers/iio/accel/sca3000.c > > >> @@ -980,7 +980,7 @@ static int sca3000_read_data(struct sca3000_state *st, > > >> st->tx[0] = SCA3000_READ_REG(reg_address_high); > > >> ret = spi_sync_transfer(st->us, xfer, ARRAY_SIZE(xfer)); > > >> if (ret) { > > >> - dev_err(get_device(&st->us->dev), "problem reading register"); > > >> + dev_err(&st->us->dev, "problem reading register\n"); > > >> return ret; > > >> } > > >> > > >> -- > > >> 2.25.1 > > >> > > > > >