Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1253673ybt; Thu, 2 Jul 2020 00:22:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz21eM362vMlQNlshnTfTFfp75Et6mGWXq3RfxYI0N5vHBwQcbWshe4fvHAmCZM+lM19JRw X-Received: by 2002:aa7:c24d:: with SMTP id y13mr34683085edo.123.1593674538990; Thu, 02 Jul 2020 00:22:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593674538; cv=none; d=google.com; s=arc-20160816; b=PwbChCgf7Ev8JGVXg5M9y97X4BaI0WaL9476T6v+1a74Y9xS7KS7FlgvkVaKDWr+Yk Tl28GNzYMnTOgoh9+RzCqYWsl9MKA8zOSU3YzJM9X/RuhPBQ0jqVs5+pdPfYiLSjNiNd X5Ap8JjVh9uNVaWdvaJEICh11cbcbvBqIPTgmCU79E0bMAoNaPz6KjQca9RBe11YvUVp tebSLTodEwOp1rOApuPylj9AZaToAe3bscPcQ+lxwcitUG3fM0lz1kLtsOT/UILPTqwl Aw37uPt9XA8HjFrOknPETEOZkxhFZ4YgHA1AFKMljVRFKcWZ6Hu+pdwCFHqSr4Inszse PRQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=/tjUSZvelD9pwu7V2Xjt+lzdEtoGhbK82R7hJcVtt44=; b=DkH21JIY+lWUOv+cjbWBc5gqdPTOSBcvxYfmNG1X7lh1lahO/UmT2ukLyOf5AFGhaH yC3rMEw+gan64hlCSSrLSgC9K9L/h7fxPoohHVVGJo9v71ZnyhpFxB9xHrQMOFpJmoqs R/BoEESAd8+7zUu7bR8iohHv/1qkSWFQSF5lo7ons7PlH4WplFucfeEbz0IRMFoA7DDp CutWn3Zy0J17/iI6IM54lA2vZPYNMuLcfkosVaUGEHso2R0vEQtB5gLR3lNnP5FhwyY9 y9edPXq7s6EP+nIpZu1/eDL5RfYInH5jh/iIOQZ0Ch5n+NfDBV4LHTPdM0bMNiXJtCzJ rlbw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n8si5047690edo.580.2020.07.02.00.21.56; Thu, 02 Jul 2020 00:22:18 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726874AbgGBHUg (ORCPT + 99 others); Thu, 2 Jul 2020 03:20:36 -0400 Received: from mx2.suse.de ([195.135.220.15]:39576 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726442AbgGBHUf (ORCPT ); Thu, 2 Jul 2020 03:20:35 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id B7D7CADD9; Thu, 2 Jul 2020 07:20:33 +0000 (UTC) Subject: Re: [PATCH v2] drm/hisilicon: Use drmm_kzalloc() instead of devm_kzalloc() To: Tian Tao , puck.chen@hisilicon.com, airlied@linux.ie, daniel@ffwll.ch, kraxel@redhat.com, alexander.deucher@amd.com, tglx@linutronix.de, dri-devel@lists.freedesktop.org, xinliang.liu@linaro.org, linux-kernel@vger.kernel.org Cc: linuxarm@huawei.com References: <1593673602-49027-1-git-send-email-tiantao6@hisilicon.com> From: Thomas Zimmermann Message-ID: <31a82ab1-e140-5e4d-774b-355a68f44add@suse.de> Date: Thu, 2 Jul 2020 09:20:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <1593673602-49027-1-git-send-email-tiantao6@hisilicon.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="rRMyF5m1L3QxZNeFgEJed0wTPQUm0B0sO" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --rRMyF5m1L3QxZNeFgEJed0wTPQUm0B0sO Content-Type: multipart/mixed; boundary="cxHHqSSparaUC5MYFuCGNwSnEcHFGNJ4Q"; protected-headers="v1" From: Thomas Zimmermann To: Tian Tao , puck.chen@hisilicon.com, airlied@linux.ie, daniel@ffwll.ch, kraxel@redhat.com, alexander.deucher@amd.com, tglx@linutronix.de, dri-devel@lists.freedesktop.org, xinliang.liu@linaro.org, linux-kernel@vger.kernel.org Cc: linuxarm@huawei.com Message-ID: <31a82ab1-e140-5e4d-774b-355a68f44add@suse.de> Subject: Re: [PATCH v2] drm/hisilicon: Use drmm_kzalloc() instead of devm_kzalloc() References: <1593673602-49027-1-git-send-email-tiantao6@hisilicon.com> In-Reply-To: <1593673602-49027-1-git-send-email-tiantao6@hisilicon.com> --cxHHqSSparaUC5MYFuCGNwSnEcHFGNJ4Q Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hi Am 02.07.20 um 09:06 schrieb Tian Tao: > using the new API drmm_kzalloc() instead of devm_kzalloc() >=20 > v2: > keep the DRM include statements sorted alphabetically. >=20 > Signed-off-by: Tian Tao > Reviewed-by: Thomas Zimmermann > --- > drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 18 +++++++++--------= - > 1 file changed, 9 insertions(+), 9 deletions(-) >=20 > diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/= gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c > index a6fd0c2..b557728 100644 > --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c > +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c > @@ -11,18 +11,18 @@ > * Jianhua Li > */ > =20 > +#include > +#include > +#include > +#include > +#include > +#include > +#include > #include > #include > -#include > - > -#include > #include > -#include > -#include > #include > -#include > -#include > -#include > +#include Ok, that's a bit too much. :D First of all, it's still not alphabetically. Second, linux headers go first, then drm headers follow. It should look like #include #include #include #include #include #include with each block sorted alphabetically. If you include drm_managed.h right before drm_print.h, it should be fine already. Best regards Thomas > =20 > #include "hibmc_drm_drv.h" > #include "hibmc_drm_regs.h" > @@ -267,7 +267,7 @@ static int hibmc_load(struct drm_device *dev) > struct hibmc_drm_private *priv; > int ret; > =20 > - priv =3D devm_kzalloc(dev->dev, sizeof(*priv), GFP_KERNEL); > + priv =3D drmm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); > if (!priv) { > DRM_ERROR("no memory to allocate for hibmc_drm_private\n"); > return -ENOMEM; >=20 --=20 Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany (HRB 36809, AG N=C3=BCrnberg) Gesch=C3=A4ftsf=C3=BChrer: Felix Imend=C3=B6rffer --cxHHqSSparaUC5MYFuCGNwSnEcHFGNJ4Q-- --rRMyF5m1L3QxZNeFgEJed0wTPQUm0B0sO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQFIBAEBCAAyFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAl79ir0UHHR6aW1tZXJt YW5uQHN1c2UuZGUACgkQaA3BHVMLeiNxmwf/T+1KsEjCZPwfy7v4tgGrq3eZQkbB KB3230daBqr8HMjjFOQJVbdXN92GDlvzFMh/7KY3C5epuJq+PfrQGj/bOvKa4esF A1Tbwim0xe2W59bkYxKgjWWpcmsgw1PiXFNKiwWvfrmgdFplFGruXziaUg6RAKKL qchgRC/7QVXNzHLIKxXKw0D/CtlVeEsE4MreKJz3ui/eufuaguAQ83CtSnTg2WiH zwYeKN9iVwD2g5QNg+k/6ybg28h/pzcQUiniGcNstNspEac/kS9vWzBP9NITcjCO CQkeShEUin57z4x0DlJNeE2vgVV4UQk01tyZGZqSms2kXSy2rXX8rfY/Dw== =t20u -----END PGP SIGNATURE----- --rRMyF5m1L3QxZNeFgEJed0wTPQUm0B0sO--