Message ID | 20230131103244.624698-1-alexander.stein@ew.tq-group.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Hans Verkuil |
Headers |
Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from <linux-media-owner@vger.kernel.org>) id 1pMnwg-00CzQj-6J; Tue, 31 Jan 2023 10:32:58 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230239AbjAaKcz (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Tue, 31 Jan 2023 05:32:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230013AbjAaKcy (ORCPT <rfc822;linux-media@vger.kernel.org>); Tue, 31 Jan 2023 05:32:54 -0500 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5944F3EFD9 for <linux-media@vger.kernel.org>; Tue, 31 Jan 2023 02:32:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1675161171; x=1706697171; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=g5pISfBTZt9KTAHmKBM/Y7t3GywY88DeJKM6jNbQhzM=; b=eqGaX18BsQZ/cfO6Zpln/+Rw9xFsHAx2zNEbYXuIwnfdBVC8BpRJPLuq 48Y0SrhzahmHXTlKrL1XbUNyBwO3oPTM9ejueKMKlJj8uIwGC8xrfNFB7 bJKJe4lmffsDtWClH5hH7FWSHPHME72FjWK6hRhWz+LpingwAuMFhzkjI bvOtz7w5XZGD4cUbijX0tYFeMIcXDBWlPv8+KHtKD9G+5qGNArjI8idrY z3qKHPev3tr/QotocnyEDAJv6/M7HKPpsLNJoUUruAVOXW4vYlZd/hDzu KEfLRYR2vgGNZfcMwT9dA4Ov7kV/cp2hFbldp3sGSFyS0zB0tL7X1sqMQ A==; X-IronPort-AV: E=Sophos;i="5.97,261,1669071600"; d="scan'208";a="28767280" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 31 Jan 2023 11:32:49 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Tue, 31 Jan 2023 11:32:49 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Tue, 31 Jan 2023 11:32:49 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1675161169; x=1706697169; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=g5pISfBTZt9KTAHmKBM/Y7t3GywY88DeJKM6jNbQhzM=; b=McBuQdXU7dUkYO/KajpbfQtI/MOl4/HIBgY3/4PvgvbeBI1TrM/9UxQl YFPPG0CAoKgU+qsxiTmUH1Nhdp8Pas5w06n/Ip8jQNrrJoNefzGH34CND qMjuD4OMzsTNyBVDz07V9a0e2nKfiukCW3gcy657GOKDVmpNuMxmyYUKI 2FN6objgVeJuZlJCS7TKtLy+lx8seP5z+K6qnn6iMxhrj39wQDo7Nh7Ae 5GLeEasB7BDzzNRixQoTVe3IM532FLSfFNiA4neJsl7gRrJVfTHxJTRhu cwBlyyRrh8aZv/9ANysHJncAvEm145Yu+fBs5d/EK08pc7OnAAUTsWgVU g==; X-IronPort-AV: E=Sophos;i="5.97,261,1669071600"; d="scan'208";a="28767278" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 31 Jan 2023 11:32:49 +0100 Received: from steina-w.tq-net.de (unknown [10.123.53.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id 8C03B280056; Tue, 31 Jan 2023 11:32:49 +0100 (CET) From: Alexander Stein <alexander.stein@ew.tq-group.com> To: Ming Qian <ming.qian@nxp.com>, Shijie Qin <shijie.qin@nxp.com>, Zhou Peng <eagle.zhou@nxp.com>, Mauro Carvalho Chehab <mchehab@kernel.org> Cc: Alexander Stein <alexander.stein@ew.tq-group.com>, linux-media@vger.kernel.org Subject: [PATCH 1/1] media: amphion: use dev_err_probe Date: Tue, 31 Jan 2023 11:32:44 +0100 Message-Id: <20230131103244.624698-1-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -2.4 (--) X-LSpam-Report: No, score=-2.4 required=5.0 tests=BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1 autolearn=ham autolearn_force=no |
Series |
[1/1] media: amphion: use dev_err_probe
|
|
Commit Message
Alexander Stein
Jan. 31, 2023, 10:32 a.m. UTC
This simplifies the code and silences -517 error messages. Also
the reason is listed in /sys/kernel/debug/devices_deferred.
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
drivers/media/platform/amphion/vpu_mbox.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
Comments
Hi, Am Dienstag, 31. Januar 2023, 11:32:44 CET schrieb Alexander Stein: > This simplifies the code and silences -517 error messages. Also > the reason is listed in /sys/kernel/debug/devices_deferred. > > Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> is there any feedback on this? Thanks and best regards, Alexander > --- > drivers/media/platform/amphion/vpu_mbox.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/drivers/media/platform/amphion/vpu_mbox.c > b/drivers/media/platform/amphion/vpu_mbox.c index > bf759eb2fd46..b6d5b4844f67 100644 > --- a/drivers/media/platform/amphion/vpu_mbox.c > +++ b/drivers/media/platform/amphion/vpu_mbox.c > @@ -46,11 +46,10 @@ static int vpu_mbox_request_channel(struct device *dev, > struct vpu_mbox *mbox) cl->rx_callback = vpu_mbox_rx_callback; > > ch = mbox_request_channel_byname(cl, mbox->name); > - if (IS_ERR(ch)) { > - dev_err(dev, "Failed to request mbox chan %s, ret : %ld\n", > - mbox->name, PTR_ERR(ch)); > - return PTR_ERR(ch); > - } > + if (IS_ERR(ch)) > + return dev_err_probe(dev, PTR_ERR(ch), > + "Failed to request mbox chan %s\n", > + mbox->name); > > mbox->ch = ch; > return 0;
>Hi, > >Am Dienstag, 31. Januar 2023, 11:32:44 CET schrieb Alexander Stein: >> This simplifies the code and silences -517 error messages. Also the >> reason is listed in /sys/kernel/debug/devices_deferred. >> >> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Reviewed-by: ming_qian <ming.qian@nxp.com> > >is there any feedback on this? > >Thanks and best regards, >Alexander > >> --- >> drivers/media/platform/amphion/vpu_mbox.c | 9 ++++----- >> 1 file changed, 4 insertions(+), 5 deletions(-) >> >> diff --git a/drivers/media/platform/amphion/vpu_mbox.c >> b/drivers/media/platform/amphion/vpu_mbox.c index >> bf759eb2fd46..b6d5b4844f67 100644 >> --- a/drivers/media/platform/amphion/vpu_mbox.c >> +++ b/drivers/media/platform/amphion/vpu_mbox.c >> @@ -46,11 +46,10 @@ static int vpu_mbox_request_channel(struct device >> *dev, struct vpu_mbox *mbox) cl->rx_callback = vpu_mbox_rx_callback; >> >> ch = mbox_request_channel_byname(cl, mbox->name); >> - if (IS_ERR(ch)) { >> - dev_err(dev, "Failed to request mbox chan %s, ret : >%ld\n", >> - mbox->name, PTR_ERR(ch)); >> - return PTR_ERR(ch); >> - } >> + if (IS_ERR(ch)) >> + return dev_err_probe(dev, PTR_ERR(ch), >> + "Failed to request mbox chan >%s\n", >> + mbox->name); >> >> mbox->ch = ch; >> return 0; > > >-- >TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany >Amtsgericht München, HRB 105018 >Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider >https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.tq >- >group.com%2F&data=05%7C01%7Cming.qian%40nxp.com%7Cf727eee294b74 >d6b250d08db25219119%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0% >7C638144598318747307%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw >MDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C% >7C&sdata=UREXcvYNz6K%2FoF%2Bahc7%2Bhos7fv9Lz3N0Fx2u5a%2F8Jlo%3D >&reserved=0 >
Hi, Am Freitag, 17. März 2023, 09:52:51 CEST schrieb Ming Qian: > >Hi, > > > >Am Dienstag, 31. Januar 2023, 11:32:44 CET schrieb Alexander Stein: > >> This simplifies the code and silences -517 error messages. Also the > >> reason is listed in /sys/kernel/debug/devices_deferred. > >> > >> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> > > Reviewed-by: ming_qian <ming.qian@nxp.com> Thanks. Who is going to pick this patch? Best regards, Alexander > >is there any feedback on this? > > > >Thanks and best regards, > >Alexander > > > >> --- > >> > >> drivers/media/platform/amphion/vpu_mbox.c | 9 ++++----- > >> 1 file changed, 4 insertions(+), 5 deletions(-) > >> > >> diff --git a/drivers/media/platform/amphion/vpu_mbox.c > >> b/drivers/media/platform/amphion/vpu_mbox.c index > >> bf759eb2fd46..b6d5b4844f67 100644 > >> --- a/drivers/media/platform/amphion/vpu_mbox.c > >> +++ b/drivers/media/platform/amphion/vpu_mbox.c > >> @@ -46,11 +46,10 @@ static int vpu_mbox_request_channel(struct device > >> *dev, struct vpu_mbox *mbox) cl->rx_callback = vpu_mbox_rx_callback; > >> > >> ch = mbox_request_channel_byname(cl, mbox->name); > >> > >> - if (IS_ERR(ch)) { > > > >> - dev_err(dev, "Failed to request mbox chan %s, ret : > >%ld\n", > > > >> - mbox->name, PTR_ERR(ch)); > >> - return PTR_ERR(ch); > >> - } > >> + if (IS_ERR(ch)) > >> + return dev_err_probe(dev, PTR_ERR(ch), > >> + "Failed to request mbox chan > > > >%s\n", > > > >> + mbox->name); > >> > >> mbox->ch = ch; > >> return 0; > > > >-- > >TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany > >Amtsgericht München, HRB 105018 > >Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider > >https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.tq > >- > >group.com%2F&data=05%7C01%7Cming.qian%40nxp.com%7Cf727eee294b74 > >d6b250d08db25219119%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0% > >7C638144598318747307%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw > >MDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C% > >7C&sdata=UREXcvYNz6K%2FoF%2Bahc7%2Bhos7fv9Lz3N0Fx2u5a%2F8Jlo%3D > >&reserved=0
diff --git a/drivers/media/platform/amphion/vpu_mbox.c b/drivers/media/platform/amphion/vpu_mbox.c index bf759eb2fd46..b6d5b4844f67 100644 --- a/drivers/media/platform/amphion/vpu_mbox.c +++ b/drivers/media/platform/amphion/vpu_mbox.c @@ -46,11 +46,10 @@ static int vpu_mbox_request_channel(struct device *dev, struct vpu_mbox *mbox) cl->rx_callback = vpu_mbox_rx_callback; ch = mbox_request_channel_byname(cl, mbox->name); - if (IS_ERR(ch)) { - dev_err(dev, "Failed to request mbox chan %s, ret : %ld\n", - mbox->name, PTR_ERR(ch)); - return PTR_ERR(ch); - } + if (IS_ERR(ch)) + return dev_err_probe(dev, PTR_ERR(ch), + "Failed to request mbox chan %s\n", + mbox->name); mbox->ch = ch; return 0;