From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753093AbdJUIOj (ORCPT ); Sat, 21 Oct 2017 04:14:39 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:51770 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751668AbdJUIOg (ORCPT ); Sat, 21 Oct 2017 04:14:36 -0400 X-Google-Smtp-Source: ABhQp+Tnzzyg1prWSAwlYI5l0PMZCgWePBu6xgHmr1DKuk4fiM8XuMrcK5OtJnYNxVNFPYhMC8LP8Q== Subject: Re: [PATCH V2 3/4] thermal/drivers/hisi: Prepare to add support for other hisi platforms To: Eduardo Valentin Cc: rui.zhang@intel.com, kevin.wangtao@linaro.org, leo.yan@linaro.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org References: <1508512267-18302-1-git-send-email-daniel.lezcano@linaro.org> <1508512267-18302-4-git-send-email-daniel.lezcano@linaro.org> <20171020205829.GA19087@localhost.localdomain> From: Daniel Lezcano Message-ID: Date: Sat, 21 Oct 2017 10:14:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171020205829.GA19087@localhost.localdomain> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20/10/2017 22:58, Eduardo Valentin wrote: > On Fri, Oct 20, 2017 at 05:11:06PM +0200, Daniel Lezcano wrote: >> From: Kevin Wangtao >> >> For platform compatibility, add the tsensor ops to a thermal data >> structure. Each platform has its own probe function to register proper >> tsensor ops function to the pointer, platform related resource request >> are also implemented in the platform probe function. >> >> Signed-off-by: Kevin Wangtao >> Tested-by: Daniel Lezcano # hikey6220 >> Signed-off-by: Daniel Lezcano > > This patch adds this issue to hisi driver (sparse) > > drivers/thermal/hisi_thermal.c:398:24: warning: incorrect type in assignment (different modifiers) > drivers/thermal/hisi_thermal.c:398:24: expected int ( *platform_probe )( ... ) > drivers/thermal/hisi_thermal.c:398:24: got void const * > > essentially you are casting a const into a non const. > > Please fix and resend. I was not able to reproduce the warning. I tried the C=1, C=2 options, cross compiled or compiled on x86 with COMPILE_TEST, the warning does not appear. Are you using make C=1 or something else to run sparse on the kernel sources ? -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog