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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8E21CD4942 for ; Thu, 21 Sep 2023 03:22:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229741AbjIUDWS (ORCPT ); Wed, 20 Sep 2023 23:22:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229643AbjIUDV6 (ORCPT ); Wed, 20 Sep 2023 23:21:58 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2734E18E for ; Wed, 20 Sep 2023 20:21:42 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 35328C433C7; Thu, 21 Sep 2023 03:21:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695266501; bh=rx0lV0XY3QhgXMp4TLjOqLDqdJJaH8x9Ozj9/UaXFd4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=m/w0/nMsnVgiNFiD0PwSWGXuKFooA/+XFlEuszfnBoM1hSUqWc2ALpw964SEwX7Up Rw5VfCYrVdQi6mvp3+Erngo5hYccLoiVgl+zusIfgCSUnuZqK5OKv9ZKntBXq6V8HE SxfG0v5N0Z4zpzBzfKG/hpfSdJcp6Bx+S/MlhdaRQ4WZ4Loz8elvrEPG4IAdKSevDY r9wjCDWDCm+CdaTBZ4XwHDAk279Ej34DaqdwoFYJoZwKPmvvVZcQuxk0FR/bWPchOa KNQ8aO76dC0bRrEUyqPlW/nfbI/rTaOaZnkXBch4ZfFmI8JvMtsrXYKLf9wj5vDCaJ wLx0dD0jBDBJQ== Date: Thu, 21 Sep 2023 11:21:38 +0800 From: Tzung-Bi Shih To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Cc: Dmitry Torokhov , Benson Leung , Guenter Roeck , Greg Kroah-Hartman , Jonathan Cameron , joewu =?utf-8?B?KOWQs+S7suaMryk=?= , linux-input@vger.kernel.org, chrome-platform@lists.linux.dev, kernel@pengutronix.de Subject: Re: [PATCH 02/52] input: cros_ec_keyb - Convert to platform remove callback returning void Message-ID: References: <20230920125829.1478827-1-u.kleine-koenig@pengutronix.de> <20230920125829.1478827-3-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230920125829.1478827-3-u.kleine-koenig@pengutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org On Wed, Sep 20, 2023 at 02:57:39PM +0200, Uwe Kleine-König wrote: > The .remove() callback for a platform driver returns an int which makes > many driver authors wrongly assume it's possible to do error handling by > returning an error code. However the value returned is ignored (apart > from emitting a warning) and this typically results in resource leaks. > To improve here there is a quest to make the remove callback return > void. In the first step of this quest all drivers are converted to > .remove_new() which already returns void. Eventually after all drivers > are converted, .remove_new() will be renamed to .remove(). > > Trivially convert this driver from always returning zero in the remove > callback to the void returning variant. > > Signed-off-by: Uwe Kleine-König Reviewed-by: Tzung-Bi Shih