From patchwork Tue Oct 2 16:36:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11962 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id BB26A2414D for ; Tue, 2 Oct 2012 16:37:31 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 67F8DA18739 for ; Tue, 2 Oct 2012 16:37:31 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so14609064iej.11 for ; Tue, 02 Oct 2012 09:37:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-provags-id:x-gm-message-state; bh=4TEHy8fJnHV5uAdBIMovYFZrCM0uK5sVU83cW6/+0kE=; b=UtryHex8zy7axBQf3azisK0Ayfe0LkRfDn3inXPZTfpIrn4RO6Fr/rAmF+4C9u69Q8 2oUlp7ewOYmyRgeynN6p6v/gEJJqt80DEFhtFKvaBS1b1b2waAkGQUk3bD8qts1Asf4A kRlttOk+v4ADFro/+3Q6xYBkTQMx7o1zDMMQNFY10Fgf6oeeBX/s4/Dw6iAw6sqxBjXs IMCAvoF1zn2MzHug4Tt89E5A2UlYOMqXA9F1MTCYt+kaCgJ5W6aNjNZ0Gi5jildmuJwm djXw+ZzC8CSA0i0KCdrwGD3/XcK4jnYc7OKMTr9ENkxLXkbUa92zbZW525KlzrWbfL88 zmEQ== Received: by 10.50.150.198 with SMTP id uk6mr9390203igb.43.1349195851175; Tue, 02 Oct 2012 09:37:31 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp92097igc; Tue, 2 Oct 2012 09:37:30 -0700 (PDT) Received: by 10.180.79.103 with SMTP id i7mr23088796wix.13.1349195849690; Tue, 02 Oct 2012 09:37:29 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de. [212.227.126.187]) by mx.google.com with ESMTPS id a8si4516271wix.3.2012.10.02.09.37.29 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 02 Oct 2012 09:37:29 -0700 (PDT) Received-SPF: neutral (google.com: 212.227.126.187 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) client-ip=212.227.126.187; Authentication-Results: mx.google.com; spf=neutral (google.com: 212.227.126.187 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) smtp.mail=arnd@arndb.de Received: from localhost.localdomain (HSI-KBW-149-172-5-253.hsi13.kabel-badenwuerttemberg.de [149.172.5.253]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0MXVkk-1SxjNo1Gwo-00Wyq1; Tue, 02 Oct 2012 18:37:10 +0200 From: Arnd Bergmann To: linux-arm-kernel@infradead.org Cc: arm@kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Haojian Zhuang , Eric Miao , Marc Zyngier Subject: [PATCH 03/17] ARM: pxa: Wunused-result warning in viper board file Date: Tue, 2 Oct 2012 18:36:42 +0200 Message-Id: <1349195816-2225-4-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1349195816-2225-1-git-send-email-arnd@arndb.de> References: <1349195816-2225-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:usoFP0SOu5ILcy84ibuD3ciuJc8x3lRXwcYrvJo2XlC rAL1qz4eUhFJpoCpWUX4OHB/aWhyxn0ir0gu2FvXHxSh/RDPpF EHUtA8MvIo23zN4bIffFEYyyhPgA27aknQ+HQKL+mYViqxZLh0 0K/W/WBwPUNn6N6oEJ0a+BbqZ0lflcbQESXVC1KP8V2nnrwKy9 IKk/zYk20F/3xdooPPRFE3+N8oWOOKn3XxWo9zus6ifdZM3G8Z Ab9tXMWJIalINGgan+cInLqp54He0ApyhRQjwovt08lxHM6TGT XMNAUJyKSToysi13WqbFXNQlf5bhbVVunlVXWKeL+kM6GPKLGk 2av89UDUg9dRUpM27DxXdJJphVXJucJdrXHjw1ng0Kz+mjefHF IdzPAGlWem20w== X-Gm-Message-State: ALoCoQl7sjFXJreXaOTHhbsM2nK9Z+5Y1IkCKsqaLpa5wnuTKUesl75L0E4KfBsfG05OjwFNrSJ7 Calling kstrtoul requires checking the result. In case of the viper_tpm_setup function, let's fail the __setup function if the number was invalid. Without this patch, building viper_defconfig results in: arch/arm/mach-pxa/viper.c: In function 'viper_tpm_setup': arch/arm/mach-pxa/viper.c:771:10: warning: ignoring return value of 'kstrtoul', declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: Arnd Bergmann Cc: Haojian Zhuang Cc: Eric Miao Cc: Marc Zyngier --- arch/arm/mach-pxa/viper.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c index 130379f..ac733e9 100644 --- a/arch/arm/mach-pxa/viper.c +++ b/arch/arm/mach-pxa/viper.c @@ -768,8 +768,7 @@ static unsigned long viper_tpm; static int __init viper_tpm_setup(char *str) { - strict_strtoul(str, 10, &viper_tpm); - return 1; + return strict_strtoul(str, 10, &viper_tpm) >= 0; } __setup("tpm=", viper_tpm_setup);