Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2199266pxf; Sat, 27 Mar 2021 05:13:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuy9gH1Ju4cDz2c/hjSSNaDpTY1Vp1muS4gSo55Uvac/gf9+RuExi1TcP55hWsJE0hp6Ov X-Received: by 2002:a17:906:fa0e:: with SMTP id lo14mr19781463ejb.263.1616847215404; Sat, 27 Mar 2021 05:13:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616847215; cv=none; d=google.com; s=arc-20160816; b=tLWEe+qL/oSNSS33mHTvK95ixoh4hB5zKoquqDh5HFBGR3+b/mJzSKfraZGO80Kd+U rPfbV51MJ6fnTfLIll/OfzhhwYh9ryFio0EOBYrJmv3pdkLubzPKmx0oOEOAn3E+YJrB sigXNeXuQ8/itWtySrwG5cltHeArOX2cDn72Sw5bNgGpOryU1e7ox9tsgMJtEb3fDFLZ uin+i0guY4ypeX2wZPP1LTR9U7xxs3X5tUFAQ3kgHheama1u3FRNlPepzznWVR+iW2IE RWhQZJv8m2B+KVnBq2D/Ncpm7JX+X2wGfCwISFQ8pFudBCl5TG7YT46idKmOczffInP7 WtIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=gwDapttcq0hA/wdR77p0Pbci0vRxc1ylyAuj/fecKPw=; b=oLOb9GfCCCa4OsToJ3Zfqlx9TVwSp/l3VILjHoJXJKLcJGmJStu4bJHTb7wstUBhfM iOysQSIv/OgpVLMnD670zujKY2rgq2/SUySRu/QtoH5uoOFWYYC4oWsv/JSXRFW9CtWn wTlzLZcK3rLsqQOuTF+PaMvg5f4tWAPCFjdMPlHupqAqlY2FMClUvOPw67pP7m6cARRv ZomDgg5slVMeDIwIq2+uJMdw+Bh5hBJcMNh8VQXu9+cGTFSN3LDQRU0vpulMBeOMycgO vYiuQmZbia87p6qC94Chwp2xcfRtB2QJ3WF66xhFH/fb0bwSCTEQXCrTShLgb8XrjvBS EJKw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bc17si9119797edb.2.2021.03.27.05.13.12; Sat, 27 Mar 2021 05:13:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230437AbhC0ML0 (ORCPT + 99 others); Sat, 27 Mar 2021 08:11:26 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:15014 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229765AbhC0MLO (ORCPT ); Sat, 27 Mar 2021 08:11:14 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4F6yKv0wzSzPstZ; Sat, 27 Mar 2021 20:08:35 +0800 (CST) Received: from localhost.localdomain (10.67.165.24) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.498.0; Sat, 27 Mar 2021 20:11:03 +0800 From: Xiaofei Tan To: , , , CC: Xiaofei Tan , , , , Subject: [PATCH v3 12/12] ACPI: dock: fix some coding style issues Date: Sat, 27 Mar 2021 20:08:24 +0800 Message-ID: <1616846904-25719-13-git-send-email-tanxiaofei@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1616846904-25719-1-git-send-email-tanxiaofei@huawei.com> References: <1616846904-25719-1-git-send-email-tanxiaofei@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix some coding style issues reported by checkpatch.pl, including following types: WARNING: Missing a blank line after declarations ERROR: spaces required around that ':' WARNING: Statements should start on a tabstop Signed-off-by: Xiaofei Tan --- drivers/acpi/dock.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index 0937cea..7cf9215 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c @@ -271,6 +271,7 @@ static void hotplug_dock_devices(struct dock_station *ds, u32 event) if (!acpi_device_enumerated(adev)) { int ret = acpi_bus_scan(adev->handle); + if (ret) dev_dbg(&adev->dev, "scan error %d\n", -ret); } @@ -502,6 +503,7 @@ static ssize_t flags_show(struct device *dev, struct device_attribute *attr, char *buf) { struct dock_station *dock_station = dev->platform_data; + return snprintf(buf, PAGE_SIZE, "%d\n", dock_station->flags); } @@ -523,7 +525,7 @@ static ssize_t undock_store(struct device *dev, struct device_attribute *attr, begin_undock(dock_station); ret = handle_eject_request(dock_station, ACPI_NOTIFY_EJECT_REQUEST); acpi_scan_lock_release(); - return ret ? ret: count; + return ret ? ret : count; } static DEVICE_ATTR_WO(undock); @@ -535,10 +537,11 @@ static ssize_t uid_show(struct device *dev, { unsigned long long lbuf; struct dock_station *dock_station = dev->platform_data; + acpi_status status = acpi_evaluate_integer(dock_station->handle, "_UID", NULL, &lbuf); if (ACPI_FAILURE(status)) - return 0; + return 0; return snprintf(buf, PAGE_SIZE, "%llx\n", lbuf); } -- 2.8.1