From patchwork Mon Apr 3 09:38:59 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: 9659135 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 EEE3D60353 for ; Mon, 3 Apr 2017 09:39:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E85E1283ED for ; Mon, 3 Apr 2017 09:39:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DD6A128448; Mon, 3 Apr 2017 09:39:37 +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 6C2F3283ED for ; Mon, 3 Apr 2017 09:39:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752017AbdDCJjO (ORCPT ); Mon, 3 Apr 2017 05:39:14 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:34747 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751933AbdDCJjM (ORCPT ); Mon, 3 Apr 2017 05:39:12 -0400 Received: by mail-lf0-f66.google.com with SMTP id x137so12331407lff.1 for ; Mon, 03 Apr 2017 02:39:11 -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=BfOvxmrrARX9Cd4BN/Z2oprMCDqFlpYWr9i2JEX1i9Q=; b=Ob16WEGhEQ+OaGPB0G3MFzu0GwQmlc55T/cbHMUTy4YCfZZfLlVUeYApZ0CB1j6i/8 gXa6cCnA4XrsJqpiPFMimjlvt1Bs136NC+2DTuykUB7VYBgCS7CTS9fKpRPI0V5oVVZw OiMzb85DWZzT7CW2cBhiAZ1ku7wz0rSt5XpdE= 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=BfOvxmrrARX9Cd4BN/Z2oprMCDqFlpYWr9i2JEX1i9Q=; b=erLuftp3T/2IrbSyfPBPEg7iNboBZA+cxGuioLL97L70Oj/l6dvCkC4Ig92sY9iC3u iZTrcyTlbIKyApuGLmkyGkJPgQk6EM/kqTCmxske/YG+H/rpRKSNOuBFF4d+nScZi+Xc rb71ujmCOAKwiwh/pv1FO246FS7Q+QrrslNDjKKG37k4v1K364A55nA3ibdfsuVpA8pN tWL6v7XYLgvEQhNTsQT6c/TLKXCn5HRgxqStf4aOkz2GvCBKE+7eZg4TQ/4PKO5PvEoD PUV/n6RS3AjW56gNRAD59z+JcVF1i2AU7j1R57lPyJ+PXU01BvNyRNe8418T6BlRPiqe 9Zhg== X-Gm-Message-State: AFeK/H0IMJXW2K7XwumGQoR/LiqTIQWvHPU29FnSuqVlISTHeRAaEo8PKdykIzWfmxchqw== X-Received: by 10.25.43.8 with SMTP id r8mr4341979lfr.41.1491212350923; Mon, 03 Apr 2017 02:39:10 -0700 (PDT) Received: from ozzy.hq.kempniu.pl ([2001:a10:160:3::3]) by smtp.googlemail.com with ESMTPSA id y15sm2439945ljd.41.2017.04.03.02.39.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Apr 2017 02:39:10 -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 3/3] platform/x86: fujitsu-laptop: rename call_fext_func() arguments Date: Mon, 3 Apr 2017 11:38:59 +0200 Message-Id: <20170403093859.6685-4-kernel@kempniu.pl> X-Mailer: git-send-email 2.12.1 In-Reply-To: <20170403093859.6685-1-kernel@kempniu.pl> References: <20170403093859.6685-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 e5413d268b24..26149f58dba7 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; }