From patchwork Fri Jan 29 13:23:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 8163161 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 46FD89F9A0 for ; Fri, 29 Jan 2016 13:31:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6616F20386 for ; Fri, 29 Jan 2016 13:31:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8C25020383 for ; Fri, 29 Jan 2016 13:31:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755712AbcA2NbO (ORCPT ); Fri, 29 Jan 2016 08:31:14 -0500 Received: from mail.bmw-carit.de ([62.245.222.98]:46566 "EHLO linuxmail.bmw-carit.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752901AbcA2NbN (ORCPT ); Fri, 29 Jan 2016 08:31:13 -0500 X-Greylist: delayed 458 seconds by postgrey-1.27 at vger.kernel.org; Fri, 29 Jan 2016 08:31:13 EST Received: from localhost (handman.bmw-carit.intra [192.168.101.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by linuxmail.bmw-carit.de (Postfix) with ESMTPS id E118758AC2; Fri, 29 Jan 2016 14:07:27 +0100 (CET) From: Daniel Wagner To: linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: Maik Broemme , Daniel Wagner Subject: [PATCH] video: Use bool instead int pointer for get_opt_bool() argument Date: Fri, 29 Jan 2016 14:23:25 +0100 Message-Id: <1454073805-14443-1-git-send-email-daniel.wagner@bmw-carit.de> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1453992270-4688-1-git-send-email-daniel.wagner@bmw-carit.de> References: <1453992270-4688-1-git-send-email-daniel.wagner@bmw-carit.de> MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As the function name already indicates that get_opt_bool() parses for a bool. It is not a surprise that compiler is complaining about it when -Werror=incompatible-pointer-types is used: drivers/video/fbdev/intelfb/intelfbdrv.c: In function ‘intelfb_setup’: drivers/video/fbdev/intelfb/intelfbdrv.c:353:39: error: passing argument 3 of ‘get_opt_bool’ from incompatible pointer type [-Werror=incompatible-pointer-types] if (get_opt_bool(this_opt, "accel", &accel)) Signed-off-by: Daniel Wagner Reported-by: Fengguang Wu --- Hi, In the 'simple wait queue support' series is a patch which turns on -Werror=incompatible-pointer-types which will result in a compile error for intelfb. https://lkml.org/lkml/2016/1/28/462 Even if that patch wont make it, this one makes sense (at least for me :)) I'll prepend this patch to the next version of the series in order to see if I got rid of all incompatible pointer types errors caught by the kbuild test robot. cheers, daniel drivers/video/fbdev/intelfb/intelfbdrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/intelfb/intelfbdrv.c b/drivers/video/fbdev/intelfb/intelfbdrv.c index bbec737..bf20744 100644 --- a/drivers/video/fbdev/intelfb/intelfbdrv.c +++ b/drivers/video/fbdev/intelfb/intelfbdrv.c @@ -302,7 +302,7 @@ static __inline__ int get_opt_int(const char *this_opt, const char *name, } static __inline__ int get_opt_bool(const char *this_opt, const char *name, - int *ret) + bool *ret) { if (!ret) return 0;