Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2008780pxf; Fri, 26 Mar 2021 23:51:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHSSjiITFI38T3Rx+hNMO09njGYIRxBMK5NYjv08vGTNeCK6R9U6pvcUmuMlkfePDzFLzl X-Received: by 2002:a17:906:3949:: with SMTP id g9mr18117947eje.7.1616827913905; Fri, 26 Mar 2021 23:51:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616827913; cv=none; d=google.com; s=arc-20160816; b=wSNwBO1NK2PDPnd5m2fMzYtiodjs9M/dML96B3htt88Aex3+RKTA6wzccBeXyBMCNZ +s+X02/B0CNAxyKhtiCur15kHy1YhJH9EAH7899bR0vr986DAG3AwDIpJaY8fz14ztAf fY7eHOVGFwviNshbzc9tXUCGZuHqUawMKa2CkepXJk0Q65RUN87qrWtfv9zxW3Oe8WrJ Q8b7au8XRUk5m6fuO8Wt95p/QPSlm21xegeiQqaqYqXCy04duR3VO7BWDdVzp+6GVX6G 93M3t094FizCYwyLon0joS5cUlZxJeE2eqosXVIJWNdn666djxSGspapZp5wuMv8ZOe+ ICTQ== 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=DrTOmbJB0UKaf3hBHfUzPPXy33PScLJw/w3TaxCy1yQNFHwKGZSXCcpbfzB1i1g0Lm MtUs+My3+oDsU9HagYRYIPNDDTXcXw8hfJHV7wgOpGoiPAh7vuecp+ZUFgNom2NCeogd RiGrsitHkNzjYdqVttm4zhIa1G35nCaHLouP74ZorJQDAYMRbT9X7uQhDXJT8zZ3mdwm T06Q3K1p+1UQmsgx/TEIcRO0Q5tOZz5JbtOrFIdvSQMf18KVACFpxwNwbuXUd6QDxsmD VygJJlagQrT4Kd+B2Q+JZT/VxQ/imbxbTKGq8luMx2Ld7Qc6YdsD6ojaraAvzviQ/72g qZtQ== 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 a1si8240808eds.169.2021.03.26.23.51.30; Fri, 26 Mar 2021 23:51:53 -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 S231438AbhC0GoY (ORCPT + 99 others); Sat, 27 Mar 2021 02:44:24 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:15328 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231225AbhC0Gn7 (ORCPT ); Sat, 27 Mar 2021 02:43:59 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4F6q4l4w4Pz93nM; Sat, 27 Mar 2021 14:41:43 +0800 (CST) Received: from localhost.localdomain (10.67.165.24) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.498.0; Sat, 27 Mar 2021 14:43:39 +0800 From: Xiaofei Tan To: , , , CC: Xiaofei Tan , , , , Subject: [PATCH 15/15] ACPI: dock: fix some coding style issues Date: Sat, 27 Mar 2021 14:40:56 +0800 Message-ID: <1616827256-51840-16-git-send-email-tanxiaofei@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1616827256-51840-1-git-send-email-tanxiaofei@huawei.com> References: <1616827256-51840-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