Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp172500pxf; Wed, 31 Mar 2021 20:40:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpKh+NIOdPKjwBK5l1szZGbxhPsHgeIPWruCHNfauUQyczN3iFI+hlWXIa4mhTMDvlAtva X-Received: by 2002:aa7:c5c4:: with SMTP id h4mr7215159eds.375.1617248431764; Wed, 31 Mar 2021 20:40:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617248431; cv=none; d=google.com; s=arc-20160816; b=j4135RGZjly7awxypvLXCDIdjrKDj9Yzfi6ESLrD42RfvsBqDK+n6eBJXkEeKf8gQq 2DG+Emx2eLHt3WyciaWqV5Nf8UgzQyzjRroBeS6UH5Mmg4TuCdZsXeyCI/AQoU/9LFj3 JwjWS1LgnBNv+9nkuACHpmbrA3QOfMPmsotdCosKyr4tqv2yeeMn33+pthwYvLSZ2TwU ybiRT+ukGYXeQv2He9jb98ohm/a2wX4ep7+WafC9qo2xEZgIK5rJIgawB5Vha8/MUi+P +/LBuOWcES5UvkrZOTg98blCacffEyA+szWZGTAspQUEkE0q1d/8X5baH5bufjdW6HuI RxuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=RILn4VUoUDfp7ip/b6lTSPGjzAR8Negu338mhnY3lE8=; b=JvSUug7hvC8gAfsFTUefBIEV/N1ZpGDYNcvIAR9NIW2rG+LPH/921QNSe4X8B5sUo+ n2W64ezx8zclJ8IebyEzFrNCYpOMg8+2gOWOsJQX6E2FS0b68q6JxKkVdP+n5ZqFj6dG EXbkSmJbRdl/qjvjJfzwTpWVq2c3BYqiM7k+OuMASw/JcvgcVPdd1XLHbzgRngstLm8U i5ZDaRbqEDul2HcZsrFBW9rnF3asaFEQIFFklSacxHC6fDFjv9OcJ+RCO0SWXKwBU61S DD2oRYbLNT8C2dtzdDHIfZvmk/oAFhUCY+W27DZMykvWj3jVm84ytcGFtVAVxtl5FE/X HU/A== 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 x14si3361096edr.255.2021.03.31.20.40.09; Wed, 31 Mar 2021 20:40:31 -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 S232958AbhDADjH (ORCPT + 99 others); Wed, 31 Mar 2021 23:39:07 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:15129 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232800AbhDADil (ORCPT ); Wed, 31 Mar 2021 23:38:41 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4F9pkp2MK8z19K4Y; Thu, 1 Apr 2021 11:36:34 +0800 (CST) Received: from [10.67.100.236] (10.67.100.236) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.498.0; Thu, 1 Apr 2021 11:38:30 +0800 Subject: Re: [PATCH -next] i2c: gpio: use DEFINE_SPINLOCK() for spinlock To: Russell King CC: , , , , , , References: <20210327095228.105123-1-chenlifu@huawei.com> From: chenlifu Message-ID: Date: Thu, 1 Apr 2021 11:38:30 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: <20210327095228.105123-1-chenlifu@huawei.com> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.100.236] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Kindly pinging ... Best Regards, Chen Lifu ?? 2021/3/27 17:52, Chen Lifu ะด??: > From: Lifu Chen > > spinlock can be initialized automatically with DEFINE_SPINLOCK() > rather than explicitly calling spin_lock_init(). > > Reported-by: Hulk Robot > Signed-off-by: Lifu Chen > --- > arch/arm/mach-sa1100/simpad.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c > index c7fb9a73e4c5..c183432880d3 100644 > --- a/arch/arm/mach-sa1100/simpad.c > +++ b/arch/arm/mach-sa1100/simpad.c > @@ -45,7 +45,7 @@ > */ > > static long cs3_shadow; > -static spinlock_t cs3_lock; > +static DEFINE_SPINLOCK(cs3_lock); > static struct gpio_chip cs3_gpio; > > long simpad_get_cs3_ro(void) > @@ -379,8 +379,6 @@ static int __init simpad_init(void) > { > int ret; > > - spin_lock_init(&cs3_lock); > - > cs3_gpio.label = "simpad_cs3"; > cs3_gpio.base = SIMPAD_CS3_GPIO_BASE; > cs3_gpio.ngpio = 24; > > . >