From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71FA2C433E0 for ; Tue, 21 Jul 2020 15:32:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4C5A12077D for ; Tue, 21 Jul 2020 15:32:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Znk3eLr2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728281AbgGUPcm (ORCPT ); Tue, 21 Jul 2020 11:32:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728156AbgGUPcm (ORCPT ); Tue, 21 Jul 2020 11:32:42 -0400 Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F733C061794 for ; Tue, 21 Jul 2020 08:32:42 -0700 (PDT) Received: by mail-ej1-x644.google.com with SMTP id n22so19135832ejy.3 for ; Tue, 21 Jul 2020 08:32:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tuoRboIrDtHdHoQidzkzoSwQMk1s3aFFSZEM0pDEqow=; b=Znk3eLr23Z/ICXVBqyXBqBCwMcIQjNOi/+KSWFZKEerLUTzA28fLYJI9vubtQlDkQT gTwXaoT3oyrkTx+lW6RVtmToC2oMMy7kyRnDvm/whPcckSPE41komV4dtZRovS4mEx9N MfnVmrqQAcemFMLI1F6eijGyW4qV/yFJV9u8U= 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=tuoRboIrDtHdHoQidzkzoSwQMk1s3aFFSZEM0pDEqow=; b=Lb7z/onyAzTO061ogy8Vvuo697CMtdpPmEH7FkGdi+/AyF0WZ4abYrNp4+DFnXGafK Anso0G1nFRxsmnGA42SsUICkE7IYCh0B8XER43wpxaAl+EZ1p47wBsOgGXAjFyJLjy4x CE7iTeukvX+33RiHSMHMeIUyhZRvn9xBj7K+qmlUn/H/MXdO16YSYf12TOQPA6tlkkCp JrZU+hpjWq/rk/GFoNMLNjAkqx1SgNCA7B9PeSP+Hy39e24Zo+UeF8bBW08fTb184RL+ A5e9pmPSYwA2h3VdHBJiJpNMCa+NEUZk3s4F/A5vIKw25YCJOYvzUYfnuTtic7tO3NmK qwZw== X-Gm-Message-State: AOAM533F9aFElDWs481eeefSuUVmX0fU7d1g29s5cawhugLfXH2u3k5A Yn3zYTIskYOrm2fQDf0Jt3dIjOeumDY= X-Google-Smtp-Source: ABdhPJz0fGTJkNes+j1iW9ULhs6uxLNAUDrrWWZiNe2+BQS4hjzBeJ2LOud3a4yPZujgdCizrM1u/g== X-Received: by 2002:a17:906:7d86:: with SMTP id v6mr25251816ejo.542.1595345560499; Tue, 21 Jul 2020 08:32:40 -0700 (PDT) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com. [209.85.128.53]) by smtp.gmail.com with ESMTPSA id jw3sm1722697ejb.32.2020.07.21.08.32.39 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Jul 2020 08:32:39 -0700 (PDT) Received: by mail-wm1-f53.google.com with SMTP id f139so3304017wmf.5 for ; Tue, 21 Jul 2020 08:32:39 -0700 (PDT) X-Received: by 2002:a1c:dc02:: with SMTP id t2mr3051296wmg.55.1595345558904; Tue, 21 Jul 2020 08:32:38 -0700 (PDT) MIME-Version: 1.0 References: <20200718145918.17752-1-dafna.hirschfeld@collabora.com> <20200718145918.17752-6-dafna.hirschfeld@collabora.com> <114a3242-88e9-46a1-c8c8-f5bfd424d05a@collabora.com> In-Reply-To: From: Tomasz Figa Date: Tue, 21 Jul 2020 17:32:26 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 5/9] media: staging: rkisp1: add a pointer to rkisp1_device from struct rkisp1_isp To: Dafna Hirschfeld Cc: Helen Koike , Linux Media Mailing List , Laurent Pinchart , Ezequiel Garcia , Hans Verkuil , kernel@collabora.com, Dafna Hirschfeld , Sakari Ailus , "open list:ARM/Rockchip SoC..." , Mauro Carvalho Chehab Content-Type: text/plain; charset="UTF-8" Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org On Tue, Jul 21, 2020 at 5:30 PM Dafna Hirschfeld wrote: > > Hi, > > On 21.07.20 14:36, Tomasz Figa wrote: > > On Tue, Jul 21, 2020 at 2:26 PM Dafna Hirschfeld > > wrote: > >> > >> Hi, > >> > >> On 20.07.20 21:25, Helen Koike wrote: > >>> > >>> > >>> On 7/18/20 11:59 AM, Dafna Hirschfeld wrote: > >>>> The code in rkisp1-isp.c requires access to struct 'rkisp1_device' > >>>> in several places. It access it using the 'container_of' macro. > >>>> This patch adds a pointer to 'rkisp1_device' in struct 'rkisp1_isp' > >>>> to simplify the access. > >>> > >>> What is wrong with container_of? > >> > >> I remember Laurent suggested it a while ago. > >> I also feel container_of is a bit cumbersome and other entities already have a pointer to rkisp1_device. > >> > > > > Do we even need the rkisp1_isp struct? Could we just pass rkisp1_device instead? > > pass to where ? You mean to the function rkisp1_mipi_csi2_start ? Yes, all around the driver, where rkisp1_isp is passed.