Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp3306565ioa; Tue, 26 Apr 2022 00:33:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOmYFcwOcZA71P73EE6OY5iwt2s6MdvUJUEoRz8JglhgbbCzpYMeeG0x3Xkq2u62OAB4Bh X-Received: by 2002:a63:88c8:0:b0:3ab:1871:13ac with SMTP id l191-20020a6388c8000000b003ab187113acmr10926048pgd.561.1650958380864; Tue, 26 Apr 2022 00:33:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1650958380; cv=pass; d=google.com; s=arc-20160816; b=dFTZH4avRJbDZUk1W/e6ZiYdX07+Fdnh5CL6j8oGxbMN36SqEtZ9IGMwDl7iY6ShYm df+RNUDzxojU2yqfN3cVwvKN8/L5Ag8YPjAivWGYK+/3gZgDPpySNu9xD+ha1mE9zWzN deoUFWiDL3bUyvH3vFEJN7T+B858nW1b/g8LLnk4M5BP2Zp60+fAIt4CjMTBP2/N/ELD YEPSo1cyIPE5vhDj9g5ZYb8wiWZ27TQESXX6i6z6ux0R3D6EZrdz/k+EyeE27ORbwEer 7/u7T8Tn1SbJyy8+XdyChRDjAR/FVT0G7R8QZi03KGj+oxX/4OUPI69DxAKqDOFDYax2 ha0w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=s5AE6U1EnsQ1lOXAx7PW4d2cLdYTvCRln/x/datINi8=; b=HLbswRaTK6uFr46OnUk39Sdpsk2amCl2zD6G7tO/MgC5K5QHYpaADty9BfsWzVnlsD q8gK3ytfoCv23Va5FYI/ekAy/DTodHRz3jSjwiQMGsuoI4zQX6Bsjex1tvIkWF+9WSCz MARh8uV4a+r/Kw//lDFKX0OfMxDhQLyd9N5kYUJz3ygVTZmccfYm4NYzKOdd9pCFb7Ck muIdS6pw73ja2fQcrR+94oZxw+4zzKMrTN++zT9blAm885Ke7qOy+LKU9qY8d/Yq/cZg XizbT/KcHlYQsFRn8TW2pucJ4MBztEtxx+qfabZPJwGreGY+lN5LMFwGXTTH7thYcg1o g8EQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.cowan.aero header.s=dreamhost header.b=60CnaySC; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cowan.aero Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t30-20020a63461e000000b0039d8aa59bd3si16705401pga.612.2022.04.26.00.32.46; Tue, 26 Apr 2022 00:33:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.cowan.aero header.s=dreamhost header.b=60CnaySC; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cowan.aero Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242435AbiDYOnz (ORCPT + 99 others); Mon, 25 Apr 2022 10:43:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242419AbiDYOny (ORCPT ); Mon, 25 Apr 2022 10:43:54 -0400 Received: from bee.birch.relay.mailchannels.net (bee.birch.relay.mailchannels.net [23.83.209.14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8037E1C93C; Mon, 25 Apr 2022 07:40:49 -0700 (PDT) Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id C75B0121ADB; Mon, 25 Apr 2022 14:40:44 +0000 (UTC) Received: from pdx1-sub0-mail-a217.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id CCCC6120E91; Mon, 25 Apr 2022 14:40:43 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1650897643; a=rsa-sha256; cv=none; b=pzn09w4erkwNvrwR9LXn6lwlyZ9J99IwIRoCpO5e5B4KfStKgfhWHeu1lgFUFQ4bkQGpJW wdXvG2WH+RaogjEAa5nwn3+YEFg0hUc+2libiPQsLb2m7HhBQ1rpkSO6nbfNNB3qTihrBy 4mH44qATtYZ1VXIiJEnu+QwToGOUy47akzSrO0vUppvk08znAKE4MXtMp3Q1/nzoQbpad+ rSOmlnAniMMFstheur7XibIyJPy73ESNh6ubCAW4TLbGeak1py4sM/b0qB1aO5mF35tcVP 9bQBk58I/M8GLTcCYLzgXvQyNwbxr8nhnyqSepY3ukKDWZZ8gEnP+fyjGqqEEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1650897643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:dkim-signature; bh=s5AE6U1EnsQ1lOXAx7PW4d2cLdYTvCRln/x/datINi8=; b=uzZOqqgxbLoOGHgaiQYiKHnkTUmNo/luOeYKivI/9hx9NS6yUKsWkbr7emdS0cdfkGF5jP WB357sPxss2uGoAEsqerwv8dDHsIEZE+FmfF5AtY7xd0973ASa7XRHVTHyg+3HUuRKijmN Qs3dUPLN72vptBUV+1vhvvGVVzR00VAVEv7lG+XvXdbIOBMI8XUCo8KtEH246Ug/ywJ9Xy 2BdEB5ubGe//jTeqOE62suqnbZ33fbtaXsyHJaID5QgF8cxQQlI9yIc8ND1iHZDcYGAw/J i6/ynlVrIL3tcxdJ/dWpAxOvZmqwbDwhcFP7zUFzmOKJTQAXUrjvL4jm3IEI8A== ARC-Authentication-Results: i=1; rspamd-67b64f579b-dkhm9; auth=pass smtp.auth=dreamhost smtp.mailfrom=ian@linux.cowan.aero X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|ian@linux.cowan.aero X-MailChannels-Auth-Id: dreamhost X-Skirt-Oafish: 772a72b76a7ff4c9_1650897644185_2468377285 X-MC-Loop-Signature: 1650897644185:3122545546 X-MC-Ingress-Time: 1650897644185 Received: from pdx1-sub0-mail-a217.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.112.55.255 (trex/6.7.1); Mon, 25 Apr 2022 14:40:44 +0000 Received: from localhost.localdomain (unknown [69.12.38.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: ian@linux.cowan.aero) by pdx1-sub0-mail-a217.dreamhost.com (Postfix) with ESMTPSA id 4Kn73Z46qRz2d; Mon, 25 Apr 2022 07:40:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.cowan.aero; s=dreamhost; t=1650897643; bh=s5AE6U1EnsQ1lOXAx7PW4d2cLdYTvCRln/x/datINi8=; h=From:To:Cc:Subject:Date:Content-Transfer-Encoding; b=60CnaySCcFNllPkqZb0ujrtLqTey6CLl+vSwXOGPi5LntkMcThyBaofV+KdrVQUTe z+WfAylHlobJ45fZn/LTbHQ8DnbMR4yzUko1nV+pMgRysGWjmDB+N0JuuSBo4GF1QH +XRCuX7TtA1sjVgJI+R7Cnbqz22KkqGsEQAQ7stnWkevTsFQpP8/TeCmiDi/z9CIeN 2/G3cHvaytG5C8GbEBU5mkb9EplsHBQ7oHzud0U7rnc4dKEjkIyNT6HQ2yCzjjiaTI vBEhKThZWlLAtg3+L3Luj87xVcsjhubnkJ/D7avJDSFYHviB/Jqia8wl6M13+jIVUu Oakig734dQWjg== From: Ian Cowan To: Corentin Labbe Cc: Mauro Carvalho Chehab , Greg Kroah-Hartman , mjpeg-users@lists.sourceforge.net, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Ian Cowan , Dan Carpenter Subject: [PATCH v2 2/4] staging: media: zoran: setup videocodec header for debugging macros Date: Mon, 25 Apr 2022 10:40:30 -0400 Message-Id: <20220425144030.132898-1-ian@linux.cowan.aero> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This adds inline functions in the videocodec header file to convert the videocodec and videocodec_master structs to their respective contained zoran struct. This will be used to pass the zoran struct to the zrdev_XXX() macros defined in the zoran header. In the zoran header, the new include is added to ensure all variables can be completely defined with the zoran and videocodec includes where they are located. Signed-off-by: Ian Cowan --- drivers/staging/media/zoran/videocodec.h | 15 +++++++++++++++ drivers/staging/media/zoran/zoran.h | 1 + 2 files changed, 16 insertions(+) diff --git a/drivers/staging/media/zoran/videocodec.h b/drivers/staging/media/zoran/videocodec.h index 9dea348fee40..5e6057edd339 100644 --- a/drivers/staging/media/zoran/videocodec.h +++ b/drivers/staging/media/zoran/videocodec.h @@ -307,4 +307,19 @@ extern int videocodec_unregister(const struct videocodec *); int videocodec_debugfs_show(struct seq_file *m); +#include "zoran.h" +static inline struct zoran *videocodec_master_to_zoran(struct videocodec_master *master) +{ + struct zoran *zr = master->data; + + return zr; +} + +static inline struct zoran *videocodec_to_zoran(struct videocodec *codec) +{ + struct videocodec_master *master = codec->master_data; + + return videocodec_master_to_zoran(master); +} + #endif /*ifndef __LINUX_VIDEOCODEC_H */ diff --git a/drivers/staging/media/zoran/zoran.h b/drivers/staging/media/zoran/zoran.h index 42b86356c022..674658154e88 100644 --- a/drivers/staging/media/zoran/zoran.h +++ b/drivers/staging/media/zoran/zoran.h @@ -20,6 +20,7 @@ #include #include +#include #include #include #include -- 2.35.1