Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752248AbeAASVb (ORCPT + 1 other); Mon, 1 Jan 2018 13:21:31 -0500 Received: from mail-pg0-f49.google.com ([74.125.83.49]:42601 "EHLO mail-pg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752227AbeAASV3 (ORCPT ); Mon, 1 Jan 2018 13:21:29 -0500 X-Google-Smtp-Source: ACJfBov7C2y5hTVZ0mJDfkpFA0/WDn2N2wg7+KjUrNbD4PNLOSy0JpDKPteZ82KnsnKjn2Mb9FU6ng== Date: Mon, 1 Jan 2018 10:21:26 -0800 From: Eduardo Valentin To: Geert Uytterhoeven Cc: Zhang Rui , Kevin Wangtao , Arnd Bergmann , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: thermal/drivers/hisi: Remove bogus const from function return type Message-ID: <20180101182123.GA3753@localhost.localdomain> References: <1511089467-20525-1-git-send-email-geert@linux-m68k.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1511089467-20525-1-git-send-email-geert@linux-m68k.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Hello Geert, On Sun, Nov 19, 2017 at 12:04:27PM +0100, Geert Uytterhoeven wrote: > With gcc-4.1.2: > > drivers/thermal/hisi_thermal.c: In function ‘hisi_thermal_probe’: > drivers/thermal/hisi_thermal.c:530: warning: type qualifiers ignored on function return type > > Remove the "const" keyword to fix this. Interesting. I intentionally asked Daniel to include the modifier because sparse pointed this to me: 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 * which makes sense to me to be const, given that it is receiving the return of a function which returns a const void *. nclude/linux/of_device.h:extern const void *of_device_get_match_data(const struct device *dev); Cheers,