Received: by 10.223.185.116 with SMTP id b49csp6119413wrg; Thu, 8 Mar 2018 02:03:16 -0800 (PST) X-Google-Smtp-Source: AG47ELvZcpsVfsHDEi455aMSSvqJqqfOSHuE6KR3bkOBfAohFPNFaP7xNBsjx66rWlGj6UuSYICs X-Received: by 10.98.156.148 with SMTP id u20mr25604621pfk.167.1520503396377; Thu, 08 Mar 2018 02:03:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520503396; cv=none; d=google.com; s=arc-20160816; b=QklYjNa4RyMKeTrom7GpgwV7JzX3EO9NunZPSt9DOgKiYRQNl8uskWIZWXDyLTzrth dJKPD9jDrtSYa4InaexZk7ipq8eEww7ZoGOx/Rr68zOnYTBLHOfPZGvPzedY/9W8ebCT u3dJNepUIdrcJcVInhXZD/sRY2aBqi5J0YTIdFjYl2MX1BZFhXeUPRVc9kdhF4BVIt88 QE41NNaeFj0Z+tuXPyk32KdWa/hZis8b3Xs9JRVYdOpyGOG40w5MmyJN38ip7SoaelZa 47HdOE8ZAfa30WbWBKaAfdq36gjNr0wK+Z3+fcOeBayp4NeScQPhk57qiwTAGfKyvRRk treA== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=J/HcIg+z6qAX4KxuZoOhehEAAL6PhUUpxZL9I6lrKuE=; b=BAodBT3DrPiRmGzUfCk80x7dWjzZ1yObyLU7F28Yzl+UTtIiKE3AcjaSeY3ZpOkQ19 ddrqoiQG5Q4DbcU7O8ZrEMXlF7PRC1kq6kn1A1KhnOeQcxZKhh9ek56J//tn8YLydvKO 1Nh/vC1Zr6cWCYy0zHs7mV5hEnSQ2fQ8VuKJyyjS1TNBVOBxuWXPezdfrq63sjRg6p1d w0wDeAxM7M2smKHaPy0ZBx0QpDBDutNehMhcu0MQEyXvI6WkVC3QVxvkzq/X4j/1kLFN M6++8ywgnv6XM796VHz8sp6qsapiCUKcEDXxQ/fo6ldP2UdEMnfQAa+ZkbhedebebFVp SsuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FsCsIPkI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id o3-v6si11393401pld.815.2018.03.08.02.03.01; Thu, 08 Mar 2018 02:03:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FsCsIPkI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1755678AbeCHKAt (ORCPT + 99 others); Thu, 8 Mar 2018 05:00:49 -0500 Received: from mail-qt0-f193.google.com ([209.85.216.193]:35487 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755260AbeCHKAr (ORCPT ); Thu, 8 Mar 2018 05:00:47 -0500 Received: by mail-qt0-f193.google.com with SMTP id z14so6098446qti.2; Thu, 08 Mar 2018 02:00:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=J/HcIg+z6qAX4KxuZoOhehEAAL6PhUUpxZL9I6lrKuE=; b=FsCsIPkIM/4YkKTmHJWRu5+8QcHGFLcg3LBTubCpzh40TKqk2hbFagFNzFifl+ahOA BgWM1AgMAECa8schfoCb/gCghTZipK+B83YwbrNAfZIczitiJrRVPV7C5AtdHfN4OnW2 VvWnldaDrddh57l5lP530IlaVmwRTqgzG+S0GE2SkIDPKtqToWKDkBYBhuB6n1t/1G/z pOfxnMIplfkP7LXkUO+L9V273DoEXYARmpVjKEqt2AhlET6fKMsYGFKKBXAUduZZ/XLt gglunvupguSd6+5nAytbXE4qeCoT0xeadPbwjP9Rx/Lrm/eAkiw74EuAX891yDmSVvJP H3Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=J/HcIg+z6qAX4KxuZoOhehEAAL6PhUUpxZL9I6lrKuE=; b=FsGiB4GsmY7bahbKFd/EpKRFC1BD56JBS6h9G7s0ItD0imnhaxubLWUMr+VRCqBkQD R4Ssv0P/TuW3t59QCDcpj3A4NSE/JmZN4o5b3R5rwPRwIu2mZmN9xZtopLsZ9g925yG9 6IMb3PMENgl13/LL042F6jtQ/XC+GbHWc87sg+N8/euQ0EVBnwVP96Gq4Ea3kzPTDQXB JP2hn/fQnJdgaSTxYMD24sS13xWtRQ7r/9AfxROj3j98U706slwPZ6Sezd64AB+5yzw5 vRtYkoLL6wuYDwVDj/nANnMhkIMvscz0/kCbzWCAVIINhd6/foAPzpxxK9AoCCXAXHGQ Qxbg== X-Gm-Message-State: AElRT7ExaOCsiBO+Behj72O/oeFlOv1uEcyQdkHOUWBB/jUArvqshBRr waxDr9W6EK5mWkJMd/p9rCNIOCUDXbym9WjFTccVLA== X-Received: by 10.200.12.68 with SMTP id l4mr39236277qti.71.1520503246592; Thu, 08 Mar 2018 02:00:46 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.80.148 with HTTP; Thu, 8 Mar 2018 02:00:45 -0800 (PST) In-Reply-To: References: <1514533978-20408-1-git-send-email-zhengsq@rock-chips.com> <1514533978-20408-4-git-send-email-zhengsq@rock-chips.com> From: Jacob Chen Date: Thu, 8 Mar 2018 18:00:45 +0800 Message-ID: Subject: Re: [PATCH v5 03/16] media: rkisp1: Add user space ABI definitions To: Hans Verkuil Cc: Shunqian Zheng , "open list:ARM/Rockchip SoC..." , Linux Media Mailing List , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Mauro Carvalho Chehab , Sakari Ailus , Hans Verkuil , Tomasz Figa , Laurent Pinchart , =?UTF-8?B?6ZKf5Lul5bSH?= , Eddie Cai , Jeffy Chen , Allon Huang , devicetree@vger.kernel.org, Heiko Stuebner , robh+dt@kernel.org, Joao Pinto , Luis Oliveira , Jose Abreu 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 Hans, 2018-02-07 20:00 GMT+08:00 Hans Verkuil : > On 12/29/17 08:52, Shunqian Zheng wrote: >> From: Jeffy Chen >> >> Add the header for userspace > > General note: I saw four cases where this documentation referred to the > datasheet. Three comments on that: > > 1) You don't say which datasheet. > 2) I assume the datasheet is under NDA? This datasheet can't be got by customers, even under NDA. > 3) You do need to give enough information so a reasonable default can be > used. I mentioned in an earlier review that creating an initial params > struct that can be used as a templete would be helpful (or even > required), and that would be a good place to put such defaults. > It don't need a default config For applcation writers, they can just init it with zero data, and only set value for the part they concerned. As for ABI, i have checked there is no mismatches. Those structures is 32 bit aligned both in 64bit/32bit env, since there is no 64bit value. "__attribute__ ((packed))" can avoid mismatches happen when we add a 64bit value to those structures. As robin said, enums and bools are not guaranteed to be consistent between different compiler, so it's a potential risk. I have replace bools with unsigned char and enums with unsigned int. > Regards, > > Hans