[{"id":28926,"web_url":"https://patchwork.libcamera.org/comment/28926/","msgid":"<87le6n4s31.fsf@redhat.com>","date":"2024-03-12T11:17:38","subject":"Re: [PATCH v5 04/18] libcamera: internal: Move SharedMemObject\n\tclass to a common directory","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Hans de Goede <hdegoede@redhat.com> writes:\n\n> From: Andrey Konovalov <andrey.konovalov@linaro.org>\n>\n> Move SharedMemObject class out of RPi namespace and put it into\n> include/libcamera/internal so that everyone could use it.\n>\n> Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> # sc8280xp Lenovo x13s\n> Tested-by: Pavel Machek <pavel@ucw.cz>\n> Reviewed-by: Pavel Machek <pavel@ucw.cz>\n> Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>\n> Signed-off-by: Hans de Goede <hdegoede@redhat.com>\n\nReviewed-by: Milan Zamazal <mzamazal@redhat.com>\n\n> ---\n>  include/libcamera/internal/meson.build                      | 1 +\n>  .../libcamera/internal}/shared_mem_object.h                 | 6 +-----\n>  2 files changed, 2 insertions(+), 5 deletions(-)\n>  rename {src/libcamera/pipeline/rpi/common => include/libcamera/internal}/shared_mem_object.h (97%)\n>\n> diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build\n> index 33eb0fb3..5807dfd9 100644\n> --- a/include/libcamera/internal/meson.build\n> +++ b/include/libcamera/internal/meson.build\n> @@ -39,6 +39,7 @@ libcamera_internal_headers = files([\n>      'process.h',\n>      'pub_key.h',\n>      'request.h',\n> +    'shared_mem_object.h',\n>      'source_paths.h',\n>      'sysfs.h',\n>      'v4l2_device.h',\n> diff --git a/src/libcamera/pipeline/rpi/common/shared_mem_object.h b/include/libcamera/internal/shared_mem_object.h\n> similarity index 97%\n> rename from src/libcamera/pipeline/rpi/common/shared_mem_object.h\n> rename to include/libcamera/internal/shared_mem_object.h\n> index aa56c220..98636b44 100644\n> --- a/src/libcamera/pipeline/rpi/common/shared_mem_object.h\n> +++ b/include/libcamera/internal/shared_mem_object.h\n> @@ -6,8 +6,8 @@\n>   */\n>  #pragma once\n>  \n> -#include <cstddef>\n>  #include <fcntl.h>\n> +#include <stddef.h>\n>  #include <string>\n>  #include <sys/mman.h>\n>  #include <sys/stat.h>\n> @@ -19,8 +19,6 @@\n>  \n>  namespace libcamera {\n>  \n> -namespace RPi {\n> -\n>  template<class T>\n>  class SharedMemObject\n>  {\n> @@ -123,6 +121,4 @@ private:\n>  \tT *obj_;\n>  };\n>  \n> -} /* namespace RPi */\n> -\n>  } /* namespace libcamera */","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 8DFD8BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 12 Mar 2024 11:17:47 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6934F62C87;\n\tTue, 12 Mar 2024 12:17:46 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 99A076295D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 12 Mar 2024 12:17:44 +0100 (CET)","from mail-lf1-f69.google.com (mail-lf1-f69.google.com\n\t[209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-8-LMA2XDmBORO5CAMxnjHmkQ-1; Tue, 12 Mar 2024 07:17:42 -0400","by mail-lf1-f69.google.com with SMTP id\n\t2adb3069b0e04-513182f4018so3955003e87.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 12 Mar 2024 04:17:41 -0700 (PDT)","from nuthatch (nat-pool-brq-t.redhat.com. [213.175.37.10])\n\tby smtp.gmail.com with ESMTPSA id\n\tbv10-20020a0560001f0a00b0033e033898c5sm8845798wrb.20.2024.03.12.04.17.39\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 12 Mar 2024 04:17:39 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"im+yjivx\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1710242263;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=eDVoFlXLu9z7v38+cokwUq9WjmeIU0iWTsiAub8l/FE=;\n\tb=im+yjivxeiwS8uC6L4BxKNK/1Pf/wGunnsi7x33FkpMGyNQmpYq9MkMKslBAEX6QKbsyuw\n\tZnFeWqDAGo3EGJzLhJzu9j6Bg3+LUvN9bdbeehto/NQ/eMKVZKteESDhr3zeiVNRdNC97k\n\tAsBNR+qA7KLyUI0mKA9IasjRIiZZO/k=","X-MC-Unique":"LMA2XDmBORO5CAMxnjHmkQ-1","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1710242260; x=1710847060;\n\th=mime-version:user-agent:message-id:date:references:in-reply-to\n\t:subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=eDVoFlXLu9z7v38+cokwUq9WjmeIU0iWTsiAub8l/FE=;\n\tb=K8gkoEWQ4oa7L5S3Ry0zOMrpju8Qq/jM+GR4GI0eyb68R0VYyXpzCXTzIymlIpdFyp\n\tvkKbkKcuC+qq07MzkXS3/w6Ar7fhzku8xWqAA8MPUxRmxokzhZo4q+xphxzRlVe+QmKR\n\tci8qWu3PSzJBdyo2OSSSv/Z7s9SI6rgWnGrKhL1Wkt6viXue+/HXpWixtwxbrnawdFz/\n\tEP+v8+wGAMFyWunKuDp2feSqLXN0JxQFcipIZCgbC915Md4LSKmHMIOQtnu7TWUQvIOH\n\ts0x2RCocAw/WS1HJVDC0L/9GC3aLlMQvClEgECDFphY69+oItPHk43boxEpLKmuTlaM4\n\trMug==","X-Gm-Message-State":"AOJu0Yzj/rffmmyKt7z0dYBaG+IpLTZJ/mGpRIIfs6hdrjtmdliEOXbX\n\teTQy4k/dRUxbOqPgPM5YuRP1jVNNjhsKqSWxbiyOiJPCjZQL9xT/iiWeIVL2OVWe8kO76CkkfBr\n\tzCBVM2zXiSab9p5BlCWwMhT514vwXLN3OKH8Q0R1KR1696ojs0Qi6jQEIIscX2GNDI7l/TjQ=","X-Received":["by 2002:ac2:42c7:0:b0:513:5d6f:214e with SMTP id\n\tn7-20020ac242c7000000b005135d6f214emr2249276lfl.65.1710242260552; \n\tTue, 12 Mar 2024 04:17:40 -0700 (PDT)","by 2002:ac2:42c7:0:b0:513:5d6f:214e with SMTP id\n\tn7-20020ac242c7000000b005135d6f214emr2249258lfl.65.1710242260166; \n\tTue, 12 Mar 2024 04:17:40 -0700 (PDT)"],"X-Google-Smtp-Source":"AGHT+IEjghqF2C3NrTXB3xBmtbXD9qjg4D06ytxUjw208BNvEiKptyZWc9nDw/uhx/wwZbfQVDBLlA==","From":"Milan Zamazal <mzamazal@redhat.com>","To":"Hans de Goede <hdegoede@redhat.com>","Subject":"Re: [PATCH v5 04/18] libcamera: internal: Move SharedMemObject\n\tclass to a common directory","In-Reply-To":"<20240311141524.27192-5-hdegoede@redhat.com> (Hans de Goede's\n\tmessage of \"Mon, 11 Mar 2024 15:15:08 +0100\")","References":"<20240311141524.27192-1-hdegoede@redhat.com>\n\t<20240311141524.27192-5-hdegoede@redhat.com>","Date":"Tue, 12 Mar 2024 12:17:38 +0100","Message-ID":"<87le6n4s31.fsf@redhat.com>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tlibcamera-devel@lists.libcamera.org, Maxime Ripard <mripard@redhat.com>, \n\tPavel Machek <pavel@ucw.cz>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]