Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp425969ybh; Sat, 7 Mar 2020 01:33:48 -0800 (PST) X-Google-Smtp-Source: ADFU+vsbtG4MnsVFW9ffv5M4zczBnrXNUFSEvSqCJcWd1vr3NFFeI1YGn+fUjdLsUME/DStuLstr X-Received: by 2002:a05:6830:1645:: with SMTP id h5mr5992496otr.317.1583573628490; Sat, 07 Mar 2020 01:33:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583573628; cv=none; d=google.com; s=arc-20160816; b=cITGllng3+dD7SzQPzavvx12Bxh1D317n5qq9ig7/hAkIwqtfBlBXl/CU3cZuq1d4r dEaumjmr6O7xwhncQPu1W/cWezP40lO/aYZssJSvrDCERoZcmQ9gyjJAndH3g+eWLSXy DIDnYTI3hj5sCeUyfxIznMyMwwlZ7y7ROkAj7/k9P1f6kP+TMi3G3SkVgvL10+sxON6g mBlRXaTuq9bipb4Lj7ue/TiOLigVYMQJzu07rfJHAzgeSHXFJBgWjhxyRZJuhDDIfVtB LOgp8dN6YiEX9QiYdXYnvDeG0K3zDjzmjIWu3lm0+QQWidxoqcz1D7mevQSHYu9KGfKH 87+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=qWaLrRMEa0H6bqFO0jtJCqfA8jNFPKhl2ErMRoaoQHw=; b=KD3RMkmuzJr+0z+vYMD7GD+3OXNgq61q7IHikC7hISH/rdxSdD/0QFwsRG2e1HnDfk BlImYcqVI/LI88BLUuMr3w1GjAsfB2m3ngLaoq6AuJyNbtmkZ1rlL0Pqj2MByiqKIIMn iobrx9g7NB3IfzzfiLHyktDaby9KLPAV1o968MWQpwIcIi+RQqPFi1eGlbUQe9XjZqFr V4rsA8nzqVWj7l0BxW9n6VXNSTfs0nn1jMzV0jOZTgzmRpRy7/W4c9EavdOg6GdHJEcr hB+Xf6O7ST7h9cQ+sqXtXuDwVVG9sjOwBTcxyihOv4ULhVWv7Rd7Abukirzu/fIooj0w cXRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xs4all.nl header.s=s1 header.b=IElGU+Nn; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a23si1065897oie.81.2020.03.07.01.33.34; Sat, 07 Mar 2020 01:33:48 -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=@xs4all.nl header.s=s1 header.b=IElGU+Nn; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726109AbgCGJcq (ORCPT + 99 others); Sat, 7 Mar 2020 04:32:46 -0500 Received: from lb2-smtp-cloud9.xs4all.net ([194.109.24.26]:40605 "EHLO lb2-smtp-cloud9.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725878AbgCGJcq (ORCPT ); Sat, 7 Mar 2020 04:32:46 -0500 Received: from [IPv6:2001:983:e9a7:1:558f:c736:2117:17d1] ([IPv6:2001:983:e9a7:1:558f:c736:2117:17d1]) by smtp-cloud9.xs4all.net with ESMTPA id AVp4jx1PZ9Im2AVp5jJ1Ey; Sat, 07 Mar 2020 10:32:44 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s1; t=1583573564; bh=qWaLrRMEa0H6bqFO0jtJCqfA8jNFPKhl2ErMRoaoQHw=; h=Subject:To:From:Message-ID:Date:MIME-Version:Content-Type:From: Subject; b=IElGU+NnXTMjTHcDTz3x3maihzMdU9BCsmCqwtlCfQbPKjOtltUN+d2RZubmHKfe0 RkEZwiPlftL5fgaOm4VWKVXnO6uR4k2v9HY/ik63nqs3POHFpSMiZSjlCFErMhe7A5 ccZUIMtgGJQx/A8ScvcaCcVJDdn9qkzbPfpPp+weVNZJW0g5QLJgePQJbFzCx9gTa7 RMJgJLZ0GdlikC5gODepvK9VhoDRI15Tfm3YkD31lXGw62Bw/zqJUqz0NSSTkbrscT eUnN8c+oyD5SwW7OORyS8/2nXp7J+sCsK91j/MxRe3Ckl+sIcOiRF/D8QNzuOUoM07 cy98CrsQAmgRg== Subject: Re: [PATCHv4 10/11] videobuf2: add begin/end cpu_access callbacks to dma-sg To: Sergey Senozhatsky Cc: Hans Verkuil , Tomasz Figa , Mauro Carvalho Chehab , Kyungmin Park , Marek Szyprowski , Sakari Ailus , Laurent Pinchart , Pawel Osciak , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200302041213.27662-1-senozhatsky@chromium.org> <20200302041213.27662-11-senozhatsky@chromium.org> <20200307052628.GB176460@google.com> From: Hans Verkuil Message-ID: <8150bc6c-f6a4-fa2c-4e2e-552dcb168df0@xs4all.nl> Date: Sat, 7 Mar 2020 10:32:42 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200307052628.GB176460@google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfEwhK2PpFlwrt7pMeGwxfncC4Y00enycjjuQwazf0ibd9yUp4vxgG4AvMSJNNj2kB3ed5tB894CI84FMbXT4t5g/2Hgg4XahtISRrM6WeFxwK2Z1DLLw z3FUPumVEVBvHvTr0G1cDpyWdC43q9+frV1Cd0GtaiSTVlgW4yCzsQdjbVSwwjH3S+bT12C4SZHcBs40tgmMTO/Qf5Cij6b8l6DEVTt7WRGLl1PPklPJXlDr 275IJDkjWZ7kbGsHy/BKgnZJzUcX3dkrqWBU0+3DlTXGtjLFSIk8d+7wunDYWM8hxqEYaM2REqrK8MU5oFuPy8dJsydKCX8HowMuQm9rID+qe7R90V6/pN8x 9hKs2bUjf/WtctevvjgoBVQncvbHuvVOdbk5oC9dRLs1Qy+RNyP3t9rnCP/hbDCTn2sfPH4UQTPDX8g6VCTYga4Q4qvWGNP6oDHWRJP2Lau+6Jj7oeyGzMmJ 3u0NeEhSIDAnNbCXPORa650Y3mHy25PHWISggQZB6LM4VOviXReQZEfd8QmnWl0eBNG5fuHf2FfwKm+yXokt/Viw5Euu6zGXpU6Jt6P4eslS2272q+zSi2m9 FPITVQRyvgEJDIf3/7CXKKAwNa+aUpcpiWKU7rA5AeAzbA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/03/2020 06:26, Sergey Senozhatsky wrote: > On (20/03/06 15:04), Hans Verkuil wrote: > [..] >>> + /* >>> + * NOTE: dma-sg allocates memory using the page allocator directly, so >>> + * there is no memory consistency guarantee, hence dma-sg ignores DMA >>> + * attributes passed from the upper layer. That means that >>> + * V4L2_FLAG_MEMORY_NON_CONSISTENT has no effect on dma-sg buffers. >>> + */ >>> buf->pages = kvmalloc_array(buf->num_pages, sizeof(struct page *), >>> GFP_KERNEL | __GFP_ZERO); >>> if (!buf->pages) >>> @@ -470,6 +476,26 @@ static void vb2_dma_sg_dmabuf_ops_release(struct dma_buf *dbuf) >>> vb2_dma_sg_put(dbuf->priv); >>> } >>> >>> +static int vb2_dma_sg_dmabuf_ops_begin_cpu_access(struct dma_buf *dbuf, >>> + enum dma_data_direction direction) >> >> I suggest you use this style to avoid checkpatch warnings: >> >> static int >> vb2_dma_sg_dmabuf_ops_begin_cpu_access(struct dma_buf *dbuf, >> enum dma_data_direction direction) > > OK, will do. > > Just for information, my checkpatch doesn't warn me: > > $ ./scripts/checkpatch.pl outgoing/0010-videobuf2-add-begin-end-cpu_access-callbacks-to-dma-.patch We use the --strict option to checkpatch. Regards, Hans > total: 0 errors, 0 warnings, 46 lines checked > > outgoing/0010-videobuf2-add-begin-end-cpu_access-callbacks-to-dma-.patch has no obvious style problems and is ready for submission. > > -ss >