From patchwork Tue Mar 7 06:56:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 6219 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2319306wrd; Tue, 7 Mar 2023 00:51:41 -0800 (PST) X-Google-Smtp-Source: AK7set91V8DnET1Y2DyIiHR5GBpYXqnXsqm/tm5DXEQNEB5ZlzG2x3B0uh8Kzbhyl5dNR1y1wFIn X-Received: by 2002:a05:6402:1803:b0:4af:81fb:4c72 with SMTP id g3-20020a056402180300b004af81fb4c72mr11871700edy.34.1678179100940; Tue, 07 Mar 2023 00:51:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678179100; cv=none; d=google.com; s=arc-20160816; b=dLfFFKkqp8jOxHdrVKGwAdAlAYIt+nXFxdf5OcQJeBu10xRs/GSnsKI/e0I14/28fi VgrddnVj0gxvJlxLqycQWcmOuvZHAYsK5/g7eCUE6Vj6RIWlLq7u6NQXOYOwZk38SKCE PT8tDs+/MQMa9V03yBwIez7sOTpYdYHF4wdxRjKkIv7kz/mCh0HwV4LqEKtvI8MeY9Z0 hiTbKKeokJTkKd9WaYVzOkFKNwTdYCpOvdPurUEP33lxD5pGK2v8zNnHri0SkuqG0yW2 TUz6H6RdI61IVfz251WV03Wg7KGWYM9uNOSDZbbNlvCBNnmtR9Ra0qTyd1T2vZDNM8/A rlFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=mRZB84+aR/4qSUsTyFav278+VYyOeDOxJJ+k0pSvb34=; b=weMQn9PBCDr4PvjTS2ZggUOogo1tNISDWPfVNsky3xYdMEd5NuGBQkWVpdSBB1DoA/ E573TKuC2GHyaKapaYMD9JzkRcTv9YBr96G8VZ6cN0DCPU9rLtDuEu8NMpsWhblXEDJJ dezR6pAlXor0CRhv3Q3WpxHAMHG0b6rIZqabmL2auTNo4NyhcgJwSU25xoKBAOYiKksj MJQCXs0eWqpCfvbevrZwhXWY+w5HarwmVdWyWbFIdj/afhYDDajN5/EZ8uTdJMnNIWdq 29v2roMwqH4n4wCw/9clDlaOTijCvNgNoOOyWFZc6XTadGsUsE6KBUs7gjHbM20q5DkX nK6w== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kt14-20020a170906aace00b008cbae8a5109si6944510ejb.249.2023.03.07.00.51.17; Tue, 07 Mar 2023 00:51:40 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230110AbjCGISJ (ORCPT + 99 others); Tue, 7 Mar 2023 03:18:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230054AbjCGIR7 (ORCPT ); Tue, 7 Mar 2023 03:17:59 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E5B34FF02 for ; Tue, 7 Mar 2023 00:17:49 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZSVk-0003g3-IZ; Tue, 07 Mar 2023 09:17:28 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pZRF5-002Q7E-4V; Tue, 07 Mar 2023 07:56:11 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pZRF4-002uCb-Ap; Tue, 07 Mar 2023 07:56:10 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Krzysztof Kozlowski , Wim Van Sebroeck , Guenter Roeck Cc: Alim Akhtar , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH v2 0/2] watchdog: s3c2410_wdt: Simplify using dev_err_probe() Date: Tue, 7 Mar 2023 07:56:01 +0100 Message-Id: <20230307065603.2253054-1-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1505; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=3sAJvEw7NUBqpA5/z9WbVZ+NLIWBt2CTWqjU090NkEs=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkBt/23ZqoKD56fHAi1FMi7zJtN+UfwgOMebeP3 SGR63M+fEeJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZAbf9gAKCRDB/BR4rcrs CU/+B/9thet8egko24kA9dERLG7fYtwz7nxG4auEGQ+twbgp4hyF1Ln/nZBwmyv4kLCaaz0mJt2 5AWRQeW/E2BSwsPe+jlwa4GJSYdZQP5gltoenX0wImvxu09aW1Iwa/HEDq2XhCZVRtZFm8uVAKB bConPUuDyqDou6h3xLesQhcWToGrhx/6Kn9PGmTHBdxKxeTQJxlXXHAuweMXCO8/HlYhqfdpGPh n7EW3j257N9/TyiZw8SpRRBU2lmj9eemIHpYu0U1IweoYClDBPMnWGX5z7Ys2KDrOc+/RWyd0KN S1yUYouls9BPjM6TtrHp5HfQFaGeZPlm5rDZLAzhT23vwZNS X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759696483549884866?= X-GMAIL-MSGID: =?utf-8?q?1759698329053126884?= Hello, changes since (implicit) v1, sent with Message-Id: 20230306090919.2206871-1-u.kleine-koenig@pengutronix.de: - Rework patch #1 to keep s3c2410_get_wdt_drv_data() as a separate function. The return value has to change however to make effective use of dev_err_probe(). (I thought about using return ERR_PTR(dev_err_probe(...)); but this looks too ugly and that's less effective because then dev_err_probe cannot be compiled into a tail call.) - Squash patches #2 and #3. This destroys the pretty bloatometer statistic, in fact bloatometer diagnoses that the code gets bigger. I'm a bit surprised but didn't try to understand it. I assume that's because the additional parameter that dev_err_probe has to get over dev_err is the culprit. Still given that the error code is now included in the error message this is an IMHO nice patch. Now that Gunter likes patch #1 better than the one from v1, I wonder about his position about patch #2. Best regards Uwe Uwe Kleine-König (2): watchdog: s3c2410: Make s3c2410_get_wdt_drv_data() return an int watchdog: s3c2410_wdt: Simplify using dev_err_probe() drivers/watchdog/s3c2410_wdt.c | 47 +++++++++++++++------------------- 1 file changed, 20 insertions(+), 27 deletions(-) base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6 prerequisite-patch-id: 775bdd863307268e1ef16250bf2f40862637b453 prerequisite-patch-id: 924ddfbe583e97e7c9a46c2460ecbc88c29ee319