Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp839881pxj; Thu, 17 Jun 2021 15:21:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/HCwaAc/euwAQ5Q3e27eemNpp/uE9kEGTHTjlWjuKUIB5iaynUgBNFaQXp3/3x2dxaaYU X-Received: by 2002:a05:6e02:54e:: with SMTP id i14mr5336798ils.129.1623968464266; Thu, 17 Jun 2021 15:21:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623968464; cv=none; d=google.com; s=arc-20160816; b=zTsKD5n3mxlZfCtX3fW2o+xao9kw5ROFkn/aYwxaOffOuUQa+rlEsaByfxUz+t7BHO CPRHH7rNh390TCskTxRqyiruk3S1ECcCG8sebs+dflqP35p6EzYgXfk/zdS3lCJEgF9w 4kDCXAjgZqvS/cDEgcej2aTYgN2cgEoSV5/RG7HqzlaM9J2c2PaOlhiQtwy+3Thz017k mN5GyUrpI6D4KONa2bmVSywRkkHh0HUFLsUF8WZgrSfjQeRYlG2J7QrfxCt1KBiTR5pM q7FucB0tQyfqY2LwyAPbjamXTesVjUllPDeC8pTT5mOKOCinmUhxWhfZ22a1Xje9mwWA FurQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=lwAc1yJsU7uwawBw0jrP48508Sb+GisUBuf8mUw0CSQ=; b=VpoOZ2DUwiQoH6QCRA8Re/H0ES+uW4GnyF8T3a5/APupePhBCUXucWxUROI9Unnjuz PDMyyPjbeb+F5jtHbwqtDhAolGRmICodvDeVd360Wd/ZKXFrN+JhKsKXxeu4vvEJCUmt k9kTGRa/pp6jUDUOllpTlrbymUj1Ua7J/kI2qEflz/mWf/FRbr3Ox6KFyQxrtCIIoNHK z+69rsDBnQqJtqrv7Rbiry1yOSAHkFetHxGJpWlwPA/gbfVxZMeI5aN+JUE4t0FgB3tP tQ/AcVeo/bfAjPnRPjlHWXzPvQNGubKb0iF69b6boNZeizeybTwql6s9+Jwwkau06mNQ SqlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b="GHO/YGfy"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y7si7492645jae.125.2021.06.17.15.20.52; Thu, 17 Jun 2021 15:21:04 -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; dkim=pass header.i=@ffwll.ch header.s=google header.b="GHO/YGfy"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232033AbhFQRp4 (ORCPT + 99 others); Thu, 17 Jun 2021 13:45:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232525AbhFQRpy (ORCPT ); Thu, 17 Jun 2021 13:45:54 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5BBBC06175F for ; Thu, 17 Jun 2021 10:43:44 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id i94so7704190wri.4 for ; Thu, 17 Jun 2021 10:43:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=lwAc1yJsU7uwawBw0jrP48508Sb+GisUBuf8mUw0CSQ=; b=GHO/YGfyYyqABj7MtIl2Wu+QGpEAaK9gSOyMEBLNUmZuKIoPtNcNpaudIKwcLpYNwq v9yErUT7CVuhhu7WS69FNtnv6SfOcLPFdEPbOuwWHMX3IkFPjoPqlR+nw3M+e8XdPImB fyvTLKdD9PlteoBOzvL3i7bIoZXW972HX8tfE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=lwAc1yJsU7uwawBw0jrP48508Sb+GisUBuf8mUw0CSQ=; b=Oqs2Dkf8A7GUtWkV3EMMrt0tBF6/RXhWcAT7eysmusc8WeLeUQI30cvSV6ajq2vRLm 8PtMhJsxSBuKfNz9FwPma41PDLNWqA7sJQ5bVnFpWNFtScQuOKh8rhv9DALN9jz0Vw71 TwhdlrxMCRNfbGEbH04zJbvC6oKl3ECUBuX3c/+4HGj98T5eeK3/3hePUs8zYTJDW5aN VLl5wk3Mbn8PB5QTjsoEoogvkvy/bz3uhHFO1ekR63CCuszVR5xEJm+e9alzlVPvd+Ho DCnOfIRAu4Go/CwKyvRHJuGKyn7oHgLR2QKFUoEgCuktuRBTOWYIS6Q1NSNptVIrR6FG w2IA== X-Gm-Message-State: AOAM533vTB0z1a2ybyAshmxYt2Zuf3DZdKGMfOtrkrViqs5V30Fms68L s7cwzB6pLXQx7elJZOvTwSCx1g== X-Received: by 2002:a5d:6443:: with SMTP id d3mr7390981wrw.389.1623951823445; Thu, 17 Jun 2021 10:43:43 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id z18sm3195872wmf.18.2021.06.17.10.43.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Jun 2021 10:43:42 -0700 (PDT) Date: Thu, 17 Jun 2021 19:43:40 +0200 From: Daniel Vetter To: Yu Jiahua Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next] apply: use DEFINE_SPINLOCK() instead of spin_lock_init(). Message-ID: Mail-Followup-To: Yu Jiahua , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210616031713.24959-1-yujiahua1@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210616031713.24959-1-yujiahua1@huawei.com> X-Operating-System: Linux phenom 5.10.0-7-amd64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 15, 2021 at 07:17:13PM -0800, Yu Jiahua wrote: > From: Jiahua Yu > > spinlock can be initialized automatically with DEFINE_SPINLOCK() > rather than explicitly calling spin_lock_init(). > > Signed-off-by: Jiahua Yu Stuffed into drm-misc-next. The subject looked a bit strange, so I fixed that up. -Daniel > --- > drivers/video/fbdev/omap2/omapfb/dss/apply.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/video/fbdev/omap2/omapfb/dss/apply.c b/drivers/video/fbdev/omap2/omapfb/dss/apply.c > index c71021091828..acca991c7540 100644 > --- a/drivers/video/fbdev/omap2/omapfb/dss/apply.c > +++ b/drivers/video/fbdev/omap2/omapfb/dss/apply.c > @@ -108,7 +108,7 @@ static struct { > } dss_data; > > /* protects dss_data */ > -static spinlock_t data_lock; > +static DEFINE_SPINLOCK(data_lock); > /* lock for blocking functions */ > static DEFINE_MUTEX(apply_lock); > static DECLARE_COMPLETION(extra_updated_completion); > @@ -131,8 +131,6 @@ static void apply_init_priv(void) > struct mgr_priv_data *mp; > int i; > > - spin_lock_init(&data_lock); > - > for (i = 0; i < num_ovls; ++i) { > struct ovl_priv_data *op; > > -- > 2.17.1 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch