From patchwork Wed Apr 5 06:50:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBLxJlwaWXFhA==?= X-Patchwork-Id: 9663063 X-Patchwork-Delegate: dvhart@infradead.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B71B760353 for ; Wed, 5 Apr 2017 06:51:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A6F0A284FE for ; Wed, 5 Apr 2017 06:51:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9A4C028507; Wed, 5 Apr 2017 06:51:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 38062284FE for ; Wed, 5 Apr 2017 06:51:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752862AbdDEGvE (ORCPT ); Wed, 5 Apr 2017 02:51:04 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:32780 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753521AbdDEGua (ORCPT ); Wed, 5 Apr 2017 02:50:30 -0400 Received: by mail-lf0-f67.google.com with SMTP id r36so359372lfi.0 for ; Tue, 04 Apr 2017 23:50:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kempniu.pl; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jofA5aApxpxbWfQjguHkPVNAIqRor+OusCzkdwK1OKo=; b=mVrZ7omkaC0xbc3ikoVzPaTW76gwHs312dohE9kRWeWYnodW74+RauZhEzsX0aXZYC CeYiQw+YR6PrcSTYNEh1u9Cx1G+xq9F8ZW56lJbst+96Dklu2xfPV5fsyxQLjgjypX+f Ls0pi9yL22+E3nNnaKaReM85Dr/dY7vmQyYrA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jofA5aApxpxbWfQjguHkPVNAIqRor+OusCzkdwK1OKo=; b=gTxPQka1GGmwbdYBS6pOo61sQ8vEU84YU1KOfby85Be7w6kpP019Q5207rh1Bmnnh6 E5X5Z/UUx+Vlwvn56jVEeh0WRGTl9RBACtXTsYvm3t/BXwZHDGXzn2ReHtzztD5Z+2lt NvSmGId4Drsb/w5ZTKWmDsribDpfD3e84aR5Pm/zmRzERNVRny7JJ9wSsLuvu2SvFBpe xlygQEC5l3JzLGICuejtn2abhoZ5dYLASlZHyAz583bw4CUOIXOE2xZ/QhikRAvwdXI/ 4aJhgpqA8xw2bTL2t/xW7Gjo0PtuRUMW2FCTLS+QJYIM75hv8cn52XY2gm7ygLpVzweM 4VhQ== X-Gm-Message-State: AFeK/H1MRIpPTKFo4zVtArSWTpY9f9X06+pcPu9m+ZcyAd4BA9cRPRLHiSRO1DEfxjADIQ== X-Received: by 10.25.234.71 with SMTP id i68mr8609680lfh.25.1491375029079; Tue, 04 Apr 2017 23:50:29 -0700 (PDT) Received: from ozzy.nask.waw.pl ([2001:a10:160:3::3]) by smtp.googlemail.com with ESMTPSA id y15sm3529067ljd.41.2017.04.04.23.50.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Apr 2017 23:50:28 -0700 (PDT) From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= To: Jonathan Woithe , Darren Hart , Andy Shevchenko Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/3] platform/x86: fujitsu-laptop: rename call_fext_func() arguments Date: Wed, 5 Apr 2017 08:50:23 +0200 Message-Id: <20170405065023.3267-4-kernel@kempniu.pl> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170405065023.3267-1-kernel@kempniu.pl> References: <20170405065023.3267-1-kernel@kempniu.pl> MIME-Version: 1.0 Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Rename call_fext_func() arguments so that each argument's name signifies its role: - cmd -> func: sub-function to call (flags, buttons etc.), - arg0 -> op: operation to perform (get, set, get capabilities etc.), - arg1 -> feature: feature to act on (e.g. which LED), if relevant, - arg2 -> state: state to set (e.g. LED on or off), if relevant. Adjust whitespace to make checkpatch happy. Signed-off-by: Michał Kępień --- drivers/platform/x86/fujitsu-laptop.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c index 8c41968d9e7f..928778ccc4c1 100644 --- a/drivers/platform/x86/fujitsu-laptop.c +++ b/drivers/platform/x86/fujitsu-laptop.c @@ -217,13 +217,13 @@ static u32 dbg_level = 0x03; /* Fujitsu ACPI interface function */ -static int call_fext_func(int cmd, int arg0, int arg1, int arg2) +static int call_fext_func(int func, int op, int feature, int state) { union acpi_object params[4] = { - { .integer.type = ACPI_TYPE_INTEGER, .integer.value = cmd }, - { .integer.type = ACPI_TYPE_INTEGER, .integer.value = arg0 }, - { .integer.type = ACPI_TYPE_INTEGER, .integer.value = arg1 }, - { .integer.type = ACPI_TYPE_INTEGER, .integer.value = arg2 } + { .integer.type = ACPI_TYPE_INTEGER, .integer.value = func }, + { .integer.type = ACPI_TYPE_INTEGER, .integer.value = op }, + { .integer.type = ACPI_TYPE_INTEGER, .integer.value = feature }, + { .integer.type = ACPI_TYPE_INTEGER, .integer.value = state } }; struct acpi_object_list arg_list = { 4, params }; unsigned long long value; @@ -236,9 +236,8 @@ static int call_fext_func(int cmd, int arg0, int arg1, int arg2) return -ENODEV; } - vdbg_printk(FUJLAPTOP_DBG_TRACE, - "FUNC 0x%x (args 0x%x, 0x%x, 0x%x) returned 0x%x\n", - cmd, arg0, arg1, arg2, (int)value); + vdbg_printk(FUJLAPTOP_DBG_TRACE, "FUNC 0x%x (args 0x%x, 0x%x, 0x%x) returned 0x%x\n", + func, op, feature, state, (int)value); return value; }