Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp659217rdg; Wed, 11 Oct 2023 01:35:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGaNESttg8pSigz133DreMgAcCtV74iBQn3TQnC/ssCIQDUTKrQF1XkNSCzBlvxclCLiwqn X-Received: by 2002:a17:902:efc4:b0:1c5:ad14:9095 with SMTP id ja4-20020a170902efc400b001c5ad149095mr14580061plb.64.1697013314955; Wed, 11 Oct 2023 01:35:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697013314; cv=none; d=google.com; s=arc-20160816; b=f84/RemnCwHbcI5q0kzweyC7GGFWkFARTAPOEBz9NO5vwQmbJLMJdc9WAu9+vLQYWl SJJnnXi3mofzsn5mCaSoxufY5iVuiVAkaaK/RFtYaSW77AL1cweuLRrVcobBVUnUCprr oOlNmriZEgOqQKvhK/y0Xsfdhdm5j97AoqKTxkTXyUGyEvx+XR8K9Bri3eiEqrvvNKCX fCjGEo9rF9QSPcpU6qgRfkxO2wEJNdxpZKLGz+uo7JXwmMchxrl5FNBrIZO7bZ16I7wl TGapC5NODRftIJlHHRIWlyfXtrhbcA8AXiymLhH87W5tRnSbHMncfF/CuVMSmxHOTEsE Nygg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=NBSUHVYwZj4KmNlo/HekBOnWzf8kuUwRk15W2B1doHE=; fh=WCLl/0OP2znUT5nQ+L2Y+VfsP2QrcJjkWbcfgeEn9Vw=; b=x6TDX/3AWwgELvYx14vdWQFnugJR8umqjnwW5BGFO5OtvwNvJKHllKbhO9h1Z5D/V4 ww2YnHx0UwdgRwXWaCF2M3SZ3NvOoM4ad+7YDDF1LZZ1zEWTOfwja7TsUMci8l80+OBA CPrNPgORa6a9+dYitOg8/sb8bdxoVDGVOA44DZFNkXt2OmduHCSti8xrA4qalFQvdZRB Vfd0pv4a4zzHtqpVLmVvxCHGCNUma30pkzzV4Wb4w0lWWGserVqpygZDlajBpjoPz3Nq /pZ2U9jc9exV9wp6yuYKirqljdbBCiEt+PM4GayU2yTxxZ7z6tVqGZw45CCGfrbzJcnz LPqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="IscIF/4C"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id z7-20020a170903018700b001bde8c9800esi14881239plg.459.2023.10.11.01.35.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 01:35:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="IscIF/4C"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 0C66A8132A7D; Wed, 11 Oct 2023 01:35:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234700AbjJKIe7 (ORCPT + 99 others); Wed, 11 Oct 2023 04:34:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231162AbjJKIeu (ORCPT ); Wed, 11 Oct 2023 04:34:50 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C551893 for ; Wed, 11 Oct 2023 01:34:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697013240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NBSUHVYwZj4KmNlo/HekBOnWzf8kuUwRk15W2B1doHE=; b=IscIF/4CNG0hakuLujgcNSrBIBAy1RCZs8wvJw8wspTtV9xcRmyffQksZ7pN8VbNyVuzwD +mFBspK7Kw2Mm1N1/9hvEvQuR9PiPzUoiGxt+zUt/dQybZoVUgHz/vqVy81zk9FA6yfLWI bOlZpml0ZCItnYmTg218fiUhudheyQ0= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-527-kkvOX0rTNOq-KO0OA-P0cg-1; Wed, 11 Oct 2023 04:33:57 -0400 X-MC-Unique: kkvOX0rTNOq-KO0OA-P0cg-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-4063dd6729bso42616995e9.2 for ; Wed, 11 Oct 2023 01:33:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697013236; x=1697618036; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NBSUHVYwZj4KmNlo/HekBOnWzf8kuUwRk15W2B1doHE=; b=akMwJe30jtaGbUaBxSvwJepPDrbG46Cst1o6TT2wRApzz2n2qd+ajyEnDXN8x55On2 NtHADSyARNqqN63bnm2zFueI78ph6zXS33ARWARMdTOjMFQnod9GfTtTqNLmJJHB2TO/ NxwcWZrWo64VIogw8+W0SKaexIyL6/4l3ANxYZPzy3bamQT71DiKK4qcp51H5jbXGBJ9 z2QDhgu2B8U0GThMDCJtoQn2TqF7wrKa3CoZRD7dm0N+L53zW1/45nVAlmaHvsm0WPb4 S45qKVtpcSoDlGFKjtlg6dMBLse37njLEY+Qk9LI3DYNof3TZOfhxmnGB4KVtgQ4b8yP N3Ig== X-Gm-Message-State: AOJu0YzMieA6+guWOnuI+z3J793FnnEEPVCvNzYKMUvstoa9y5o0vPiZ HDhM0+j7/wID6lUvPiPwAPMLFEaZTG+O5LusL6XS/rQe6xxiOIP7WeB5g0LN/Yg/knKCVxVoWfo FqBKcYbLXnNCquh68lkhzfcIR X-Received: by 2002:a1c:f710:0:b0:401:be77:9a50 with SMTP id v16-20020a1cf710000000b00401be779a50mr17626453wmh.8.1697013236582; Wed, 11 Oct 2023 01:33:56 -0700 (PDT) X-Received: by 2002:a1c:f710:0:b0:401:be77:9a50 with SMTP id v16-20020a1cf710000000b00401be779a50mr17626440wmh.8.1697013236300; Wed, 11 Oct 2023 01:33:56 -0700 (PDT) Received: from localhost ([185.124.31.160]) by smtp.gmail.com with ESMTPSA id a4-20020a05600c224400b003fe2b081661sm18516317wmm.30.2023.10.11.01.33.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 01:33:56 -0700 (PDT) From: Javier Martinez Canillas To: Geert Uytterhoeven Cc: linux-kernel@vger.kernel.org, Maxime Ripard , Thomas Zimmermann , Daniel Vetter , David Airlie , Maarten Lankhorst , dri-devel@lists.freedesktop.org Subject: Re: [PATCH 3/8] drm/ssd13xx: Replace .page_height field in device info with a constant In-Reply-To: References: <20231009183522.543918-1-javierm@redhat.com> <20231009183522.543918-4-javierm@redhat.com> Date: Wed, 11 Oct 2023 10:33:54 +0200 Message-ID: <87pm1lsglp.fsf@minerva.mail-host-address-is-not-set> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 11 Oct 2023 01:35:12 -0700 (PDT) X-Spam-Level: ** Geert Uytterhoeven writes: Hello Geert, Thanks a lot for your feedback. > On Mon, Oct 9, 2023 at 8:36=E2=80=AFPM Javier Martinez Canillas > wrote: [...] >> u32 array_idx =3D 0; [...] >> >> for (k =3D 0; k < m; k++) { >> - u8 byte =3D buf[(8 * i + k) * line_lengt= h + j / 8]; >> + u32 idx =3D (page_height * i + k) * line= _length + j / 8; > > Nit: I would use unsigned int for idx, as that matches all other > variables involved. > But given array_idx is u32, too, u32 may makes sense. > Yes, this function logic is mostly based on ssd1307fb_update_rect() from drivers/video/fbdev/ssd1307fb.c and that is from where the u32 array_idx comes from. As you said, I used u32 for idx to be consistent with that variable type. >> + u8 byte =3D buf[idx]; >> u8 bit =3D (byte >> (j % 8)) & 1; >> >> data |=3D bit << k; > > Reviewed-by: Geert Uytterhoeven > Thanks! --=20 Best regards, Javier Martinez Canillas Core Platforms Red Hat