Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3619509ybz; Mon, 4 May 2020 06:35:51 -0700 (PDT) X-Google-Smtp-Source: APiQypKX7CQi6WJKazoUuvVD0CVQk/BI48AJyFvDZIWW8MoSqWTXjAPG/pRW11IdrTI6bGLDWn70 X-Received: by 2002:a17:906:3787:: with SMTP id n7mr15165912ejc.200.1588599350947; Mon, 04 May 2020 06:35:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588599350; cv=none; d=google.com; s=arc-20160816; b=g+y2DT1zLVfdgnGzHF02ewfl85dsyneCOLij9W99IRHmaFTXQr5QUAkqo21iV1JV0F TzjnhYv5zTQSG3Fbhk+ZrHA5KCTRX0tFrbmge4+d0a3ouLJmfYssBGiTzFfSxUvPb/i5 mGqK08s9wHNpo+bEoNov4oMDRiGg47qBX1C7GjhPiVzKfpgiirDBkAFVQoEZfEI0/iB4 4JHZVv8RDLBkyWBh+4W0QLc62nQhrKswntvdMPDWi08ZAwOLFiaf5Usn0mVsdC4DG6y1 hpFyp1wTdbEX6ea7Z1114vBUxYv4wwBUUtTe7dHMFWvn11yXzMluzUE6atPCF2yHqQ9+ C5rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=CKVu8p9mULpUJV26UBlO0ZNVdeoAZyl4GvIcj32jLfc=; b=fHl3X628GBYC2stNhIdPJGp/n977P6t5PN+F69/vE/OkGLjFsgzyFoZxTkdG/QsPTv ruef4HQmGdZKw37iSjbs7lVQ0wCu7k++UGh23Sj/1udIce729w5LIBbqoKqyNZtZRieh PIJERfG4xgoKElcCwvTt8+pRcMGzq6XxdtY7KpR8zvk/VVXux1hwWiblF9xscv1x6UHT YIOm8ejGpUmeLAdTP6YScSuxx7r3rxyw5KZncApaQR5Gaw23+vUJuSUOT8rMXv59x0cX BUGzYil2Ys7JJk+a+C1ruANIS/jDjftNCQtb24aTF78BDm1HoB07VLpWG1ULI4pq6+9T EQoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Mdj8ICMv; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b9si6538215edf.455.2020.05.04.06.35.27; Mon, 04 May 2020 06:35:50 -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=@gmail.com header.s=20161025 header.b=Mdj8ICMv; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728377AbgEDNbO (ORCPT + 99 others); Mon, 4 May 2020 09:31:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726404AbgEDNbM (ORCPT ); Mon, 4 May 2020 09:31:12 -0400 Received: from mail-vs1-xe43.google.com (mail-vs1-xe43.google.com [IPv6:2607:f8b0:4864:20::e43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2903C061A0E; Mon, 4 May 2020 06:31:12 -0700 (PDT) Received: by mail-vs1-xe43.google.com with SMTP id b10so1071145vsh.1; Mon, 04 May 2020 06:31:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CKVu8p9mULpUJV26UBlO0ZNVdeoAZyl4GvIcj32jLfc=; b=Mdj8ICMvEINKyngRw0C56nn/l70As9jUYBHBkF7cB5XPbu+mS0V+QXTSGwZ9vlwKq/ lkS7FbUhHKFI1QZLjxbDEtVDHihnWopja1AsKIp/YiO6vlZuHplAaKzMuaf5NSWarM2f KE6OzrRJue09kKbucJDol8hpl92GUJw5LCudHtr2vwmQhIff8Z7LW3KuKoGvJ/9c8lUU DobuZ7uqytasqL9HeMiFXjeogYQTH2QtTtcOfKk05IDThTnqhz0uwt8isZ9nrz4Vg/S7 1m6i83pXMaNaZW/a0QUdFo3Fo/YLOU2tkt1jq1akV8fUi/jwrnk8jfSWaUZs/RdsCMzo yFbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CKVu8p9mULpUJV26UBlO0ZNVdeoAZyl4GvIcj32jLfc=; b=Zn2XbajQ5oftqxqmjQA08UZAfmg4RTReRUFnOF7vP/fjjGfa3UWINluS7k3JCIpjaP 34nrVara1mzrZnJdPI9+qGcB/OMuLiR8DartFDnUd/BOKZuYXHlmOMhavW5pC4QrZLFt 3fvqTlTxhVMmqEPGVgx8IV6Gruro1A4PMzXf96LtdAc9nmZ+IevP1r0YjspK/fQDrLlW 9aQlagMeSeSZwYUlOAYfE9OYI3h0JgxmAsiuycWkeACK52Ep3fACyvKbrHSTEhMJsxvx 7n5TervmDPX47LGIO2yuglEXqDvaRpVkTeB30U530mmwC1c18VSgSstOGjKi/CDuV21p CZ0g== X-Gm-Message-State: AGi0PuZDLV0lQ0LWCiVieBj41Ee86CqC1vnCYLvXRpcVeEA39w6vI/FV t9Zk4VXiIKjEqnEzCg+DTbeFV13vmAJmGQqteYY= X-Received: by 2002:a67:c482:: with SMTP id d2mr12058478vsk.37.1588599071846; Mon, 04 May 2020 06:31:11 -0700 (PDT) MIME-Version: 1.0 References: <20200430192746.1866325-1-paul.kocialkowski@bootlin.com> <20200430192746.1866325-3-paul.kocialkowski@bootlin.com> In-Reply-To: <20200430192746.1866325-3-paul.kocialkowski@bootlin.com> From: Emil Velikov Date: Mon, 4 May 2020 14:28:47 +0100 Message-ID: Subject: Re: [PATCH v6 2/3] drm: Add support for the LogiCVC display controller To: Paul Kocialkowski Cc: ML dri-devel , devicetree , "Linux-Kernel@Vger. Kernel. Org" , David Airlie , Thomas Petazzoni , Rob Herring , Thomas Zimmermann Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Paul, Just had a casual quick look for custom KMS properties, since new drivers made that mistake in the past. Thanks for not including any o/ I made a couple of trivial suggestions - if you agree, feel free to keep them as follow-up patches. On Thu, 30 Apr 2020 at 20:28, Paul Kocialkowski wrote: > +int logicvc_of_property_parse_u32(struct device_node *of_node, > + const char *name, u32 *target) > +{ > + struct logicvc_of_property *property; > + const char *string; > + u32 value; > + int ret; > + > + property = logicvc_of_property_lookup(name); > + if (!property) > + return -EINVAL; > + One could have the logicvc_of_properties[] entries indexed with the logicvc_of_property_parse_{u32,bool} caller, using that instead of the name string. Aside: I suspect the array (as most other arrays in this patch) should be annotated const, correct? > + if (property->range[0] || property->range[1]) > + if (value < property->range[0] || value > property->range[1]) Combine the two ifs? -Emil