Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4556156iog; Wed, 22 Jun 2022 00:49:24 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vxJ/H8Hmucmnc3rx2bAzezoYTMDI8lblkvWjGzIW3nvPV1rjypz1t2TqX9FUK99wyX7Ke4 X-Received: by 2002:a63:82c3:0:b0:40c:c340:318d with SMTP id w186-20020a6382c3000000b0040cc340318dmr192293pgd.191.1655884164063; Wed, 22 Jun 2022 00:49:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655884164; cv=none; d=google.com; s=arc-20160816; b=mT0slMAPSHfAVR3O+BLh0rtp5+J6VS/apeiaL6J9UL5SY9LnIgyYhY4jrGt6rWD1m8 +LVX3dcFH1dxrBopk/LaIsL7/d+zVNL0RwyczdGYn8j+a4KCzE6SxM+xinSvH2tnyGWz 4wJzi22UHIqRPwai9M+UNk2Tw33eJ2CL4now+JfZvE6gncFgVlQME9liY+RYRJbtUq8h 4+VEvEkZDLz4rPq5szCH3ZxbyWuKaod09pLwbnOLHrqVDBowdSsIVj07gVAF/bZaS9Ve U21lNi8bfgtyv7qJWbgexPvcJAdsmMp+TfgjW+kVrBKKq9fX8EbW5rnMmAJ9G7LbxoJa T/gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=reRIs8RotYYv9G+60zUgiS3Ngae2CafPedGbBgfox1s=; b=OLNDZrd7or0VsS+3HVPRiJcLen3CUYxKsVXk2bU8dNJmoDOriTFJWCOM8vf816UvEB bunbnmVyHhXiDL3O95t+lRzhEmbqFTqls5sy5YEnfh52UXWvbTpaSZj2o9ICyoIf0xn4 sbjZKyGo6xMR4OwQCv86yc2m2C+cPAYNgs+iFQzp6XWrR9MQHQ/6Wp2ohxr0M86zB/Hs 07i+wIfPZGpcfQA5rkEHirviNq1c16zQ0YRlRgLzzw8vZvRUfhOW8ItM3bNw+XAIbY2g EHhFUy/mIh6MQIe2LPmkTOH0dIbt/HkZIMxu6nw9wICf12EB1aHw+IBCcAi8pqvgbObT k4Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=TqR0ioHb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i11-20020a17090ad34b00b001ec8c9341basi14666829pjx.134.2022.06.22.00.49.11; Wed, 22 Jun 2022 00:49:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=TqR0ioHb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352333AbiFVHMp (ORCPT + 99 others); Wed, 22 Jun 2022 03:12:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352317AbiFVHMm (ORCPT ); Wed, 22 Jun 2022 03:12:42 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07B7C36B7B for ; Wed, 22 Jun 2022 00:12:40 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id o8so22038098wro.3 for ; Wed, 22 Jun 2022 00:12:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=reRIs8RotYYv9G+60zUgiS3Ngae2CafPedGbBgfox1s=; b=TqR0ioHbg8kVTYHgTWbt7hdi+CxCcDiBcpwEEKIcN+cjJ5TaWJiEir9YAIHKA4cLLF JeRKyQrgVJCb6BpYG0KXSus2KrhYqRY0URC1rQVVqcQMalleO661fG8/Sg/YcX5+yTg3 ivQAjnZOD17qsa+1Tzy0lSpVfCFj3kc4uv9ogz/J9y+cvYTqFYVuOpLgZMnu+6jITbaE /Lf7y6LzXYhiVICS3iEpvn2crETWWNbbZKrWfcwMD96FtA8QZGD19iAo3asEt4JII5nd GmHl3tz5bjct4Lyhih4BkaXan4kYZwNOElFjUDQX9wZejZoyAa3r5BM8W8LkIzSHzRWo WrhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=reRIs8RotYYv9G+60zUgiS3Ngae2CafPedGbBgfox1s=; b=2dj4vvmpXWiG0/fwYMB+qepug2fJDXPvyplgud8gk5YGfBx/qa/Oo0zN2Ig+FFFX1a 5EeL+N9m1HQ74+HE4Z/Req/3OiICcOgBHhJJS9Hlxoc6YTKOQMePbWaCMrx6T8gRMA/I MtjGbSWjNNdnls4yX4U/uurpQrp88uLl3DQXKo/baN4W0+bIXBGzdJUOQ+eILK5o2Qgw vhAR/RdRl61FEYukxTgMJHIOMbdY80NJrHD5ACjZkZefVdQgt+4wKwromNrvHl8/haU2 dTxvzyuTh9y5GLbiUmmYIc4dOY1tiCjkOuIkho/xi+rI3XX+OPSzGQPUb+KgcztmAi7F Ac2A== X-Gm-Message-State: AJIora+UIKPmvC/zHx6SIrmUMhdcSGltqSF5FseHo+BE50AvEY8x7i9i CaKYCDMWSAM2UqIBUSI0vfSQ9DSNenESeS1YWBYQKQ== X-Received: by 2002:a05:6000:1f98:b0:21b:9cf4:c681 with SMTP id bw24-20020a0560001f9800b0021b9cf4c681mr1720643wrb.89.1655881957748; Wed, 22 Jun 2022 00:12:37 -0700 (PDT) MIME-Version: 1.0 References: <20220620160640.3790-1-jose.exposito89@gmail.com> <20220620160640.3790-2-jose.exposito89@gmail.com> <045f480b-9f47-6f10-9e5d-4436335b272e@suse.de> In-Reply-To: <045f480b-9f47-6f10-9e5d-4436335b272e@suse.de> From: David Gow Date: Wed, 22 Jun 2022 15:12:26 +0800 Message-ID: Subject: Re: [PATCH v4 1/3] drm/rect: Add DRM_RECT_INIT() macro To: Thomas Zimmermann Cc: =?UTF-8?B?Sm9zw6kgRXhww7NzaXRv?= , dri-devel@lists.freedesktop.org, magalilemes00@gmail.com, David Airlie , =?UTF-8?B?TWHDrXJhIENhbmFs?= , Daniel Latypov , Javier Martinez Canillas , Linux Kernel Mailing List , Jani Nikula , tales.aparecida@gmail.com, Isabella Basso , KUnit Development Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000e6df2905e2040fd3" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --000000000000e6df2905e2040fd3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jun 21, 2022 at 6:02 PM Thomas Zimmermann wro= te: > > Hi > > Am 21.06.22 um 11:38 schrieb David Gow: > > On Tue, Jun 21, 2022 at 12:06 AM Jos=C3=A9 Exp=C3=B3sito [ ... ] > >> +/** > >> + * DRM_RECT_INIT - initialize a rectangle from x/y/w/h > >> + * @x: x coordinate > >> + * @y: y coordinate > >> + * @w: width > >> + * @h: height > >> + * > >> + * RETURNS: > >> + * A new rectangle of the specified size. > >> + */ > >> +#define DRM_RECT_INIT(x, y, w, h) ((struct drm_rect){ \ > >> + .x1 =3D (x), \ > >> + .y1 =3D (y), \ > >> + .x2 =3D (x) + (w), \ > >> + .y2 =3D (y) + (h) }) > >> + > > > > My only slight concern here is that it might be a little bit confusing > > that a macro called DRM_RECT_INIT() accepts x/y/w/h, whereas the > > actual struct drm_rect is x1/y1/x2/y2. If the macro were called > > something like DRM_RECT_INIT_FROM_XYWH() or similar. > > The existing drm_rect_init() function uses xywh arguments. So the > current name is consistent with existing practice. I don't think we > refer to x2,y2 much, if ever. > Ah, fair enough. I wasn't aware of the existing drm_rect_init() function, so this makes sense as-is. Cheers, -- David --000000000000e6df2905e2040fd3 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIPnwYJKoZIhvcNAQcCoIIPkDCCD4wCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg ggz5MIIEtjCCA56gAwIBAgIQeAMYYHb81ngUVR0WyMTzqzANBgkqhkiG9w0BAQsFADBMMSAwHgYD VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UE AxMKR2xvYmFsU2lnbjAeFw0yMDA3MjgwMDAwMDBaFw0yOTAzMTgwMDAwMDBaMFQxCzAJBgNVBAYT AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMSowKAYDVQQDEyFHbG9iYWxTaWduIEF0bGFz IFIzIFNNSU1FIENBIDIwMjAwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw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