From patchwork Sun Nov 6 13:26:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 123929 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 914F5B6F6F for ; Mon, 7 Nov 2011 00:28:54 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752926Ab1KFN2h (ORCPT ); Sun, 6 Nov 2011 08:28:37 -0500 Received: from mgw2.diku.dk ([130.225.96.92]:41024 "EHLO mgw2.diku.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752239Ab1KFN05 (ORCPT ); Sun, 6 Nov 2011 08:26:57 -0500 Received: from localhost (localhost [127.0.0.1]) by mgw2.diku.dk (Postfix) with ESMTP id 0039619BBFB; Sun, 6 Nov 2011 14:26:57 +0100 (CET) Received: from mgw2.diku.dk ([127.0.0.1]) by localhost (mgw2.diku.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 18694-18; Sun, 6 Nov 2011 14:26:50 +0100 (CET) Received: from palace.topps.diku.dk (palace.ekstranet.diku.dk [192.38.115.202]) by mgw2.diku.dk (Postfix) with ESMTP id 8D57619BBE5; Sun, 6 Nov 2011 14:26:50 +0100 (CET) From: Julia Lawall To: Johannes Berg Cc: kernel-janitors@vger.kernel.org, "John W. Linville" , "David S. Miller" , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/5] net/rfkill/core.c: use kstrtoul, etc Date: Sun, 6 Nov 2011 14:26:49 +0100 Message-Id: <1320586010-21931-5-git-send-email-julia@diku.dk> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1320586010-21931-1-git-send-email-julia@diku.dk> References: <1320586010-21931-1-git-send-email-julia@diku.dk> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Julia Lawall Use kstrtoul, etc instead of the now deprecated strict_strtoul, etc. A semantic patch rule for the kstrtoul case is as follows: (http://coccinelle.lip6.fr/) // @@ expression a,b; {int,long} *c; @@ -strict_strtoul +kstrtoul (a,b,c) // Signed-off-by: Julia Lawall --- net/rfkill/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff -u -p a/net/rfkill/core.c b/net/rfkill/core.c --- a/net/rfkill/core.c +++ b/net/rfkill/core.c @@ -644,7 +644,7 @@ static ssize_t rfkill_soft_store(struct if (!capable(CAP_NET_ADMIN)) return -EPERM; - err = strict_strtoul(buf, 0, &state); + err = kstrtoul(buf, 0, &state); if (err) return err; @@ -688,7 +688,7 @@ static ssize_t rfkill_state_store(struct if (!capable(CAP_NET_ADMIN)) return -EPERM; - err = strict_strtoul(buf, 0, &state); + err = kstrtoul(buf, 0, &state); if (err) return err;