From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 49E4B3C0B for ; Mon, 9 Jan 2023 17:06:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 85D1CC433F0; Mon, 9 Jan 2023 17:06:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673283968; bh=vEV9IS5lr6A/EE9wxrV5D9TaFzycOxX4Uu56ZOeL6M8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EtyaDBeUOkqQUzw6fSk49pLzNL0bz4DaGhE5rtpO3DuaDAfvTnHk+ydPYVIewSWdZ YhKx2ZCyexae5uxi0ZhHyjaWXGdg+Sg6XrXMDKPP7AjnZnKmK2i6FcDdSxzZ6xeyPB MtdcA6neLy77LFUwkJFbQqR84amGc01eNorg9kcNVmdfGVvXq6e128rkV7/4jAeSz/ tv1QYsBqpU6JNyPI/ePkEbE508hWUxyKyQUL3mZx7QwUO2hgvEFnevjf3Zd1i/DvBC WYFZ1dUkQxan5/ffs2AeNLAgbF7W3sOK/4wQk/vZupkTwxZpdSS4Ur1KhU2YWWGT0X p3KxsaY1JZHiQ== Date: Mon, 9 Jan 2023 17:06:03 +0000 From: Lee Jones To: Andy Shevchenko Cc: Pavel Machek , Vincent Knecht , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Nathan Chancellor , Nick Desaulniers , Tom Rix , kernel test robot Subject: Re: [PATCH v1 1/1] leds: is31fl319x: Wrap mutex_destroy() for devm_add_action_or_rest() Message-ID: References: <20221228093238.82713-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221228093238.82713-1-andriy.shevchenko@linux.intel.com> On Wed, 28 Dec 2022, Andy Shevchenko wrote: > Clang complains that devm_add_action() takes a parameter with a wrong type: > > warning: cast from 'void (*)(struct mutex *)' to 'void (*)(void *)' converts to incompatible function type [-Wcast-function-type-strict] > err = devm_add_action(dev, (void (*)(void *))mutex_destroy, &is31->lock); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 1 warning generated. > > It appears that the commit e1af5c815586 ("leds: is31fl319x: Fix devm vs. > non-devm ordering") missed two things: > - while mention devm_add_action_or_reset() the actual change got > devm_add_action() call by unknown reason > - strictly speaking the parameter is not compatible by type I fixed-up the wording above a little. > Fix both issues by switching to devm_add_action_or_reset() and adding a > wrapper for mutex_destroy() call. > > Reported-by: kernel test robot > Fixes: e1af5c815586 ("leds: is31fl319x: Fix devm vs. non-devm ordering") > Signed-off-by: Andy Shevchenko > Tested-by: Vincent Knecht > --- > > v2: added tag (Vincent), Cc'ed to Lee > > drivers/leds/leds-is31fl319x.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) Applied, thanks -- Lee Jones [李琼斯]