Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1083647ybe; Thu, 5 Sep 2019 10:03:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqyML1wJaTBd+ONfULKi/V7xaA2S6iA3mOFTy7B7Pa3f9k62J+6l+P8MqaKsnQxyQIpwAPux X-Received: by 2002:a17:902:9a46:: with SMTP id x6mr4587657plv.85.1567702997996; Thu, 05 Sep 2019 10:03:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567702997; cv=none; d=google.com; s=arc-20160816; b=uRixMqPhJy3mVK8aR0mc9ZIAR0D59pDVB6JuhML8fiedF1HWMUWRcbgaGZKIV7cqzz iAIBMx6EYiEmPw85pGRYAPiEBAQiIXD4iTaDN1eLdtLZ3Jl8z5I+7Vc0aAUeRUEg4s3i Gwt3a/uVMVT5G1hYD6pmrPWKAb6/LAdSNiouff2+uvFuHXio6n+q7PsIwLwC3NM305Pp w+dib2LZgb65EfW6xES+UNuWKj+bPjYYvRqENpbjerqjc9nrX4Kz7UqoY7Qw4Ok6OCyG WvvA/cN3vcmDD80c2h6YgXkcNGMAWp/0MgLHZO8Z7dPWrIWlUpm+x/aOO0NLD8rqJery lfGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=lyyeOpQgmrXkbj1A6/m74GA3Z+73NQNb+Jcv0Qmdh2g=; b=sO8Y711AUyxHe2PnhfntameON07NXOA7W98Iyz8JopIUzxYlt29jF8KHjgUhw+2Zso Lr9fe508RLFJ04qvj1ikFOxer5Y5jY5JNSmmHOGw2TIrYExWytxzggpTJ6lCTx57bmFf ZSw5yCBt6Q+wqhIlfnHVQLrr7kMRfNYo92YU1+qI/zPdIS2RHpfhXJLtVC5coASNyxtM jMMnaQ9KzP9ziUDxtZyuRx47438jKkc8Th190OeFHFS0lAWjnbLgWnqQTatMuXZLzkMm 8cAQqNGJcmcY+VutERfueXgrGY1J89Z1llSt7fzL+vU/eLw1Yd9xLGiXwtJQbimua0jd 4xlA== ARC-Authentication-Results: i=1; mx.google.com; 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 y23si2561584plr.76.2019.09.05.10.02.58; Thu, 05 Sep 2019 10:03:17 -0700 (PDT) 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; 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 S2389559AbfIEMyu (ORCPT + 99 others); Thu, 5 Sep 2019 08:54:50 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:52392 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730864AbfIEMyt (ORCPT ); Thu, 5 Sep 2019 08:54:49 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 3957387A09CF12788B44; Thu, 5 Sep 2019 20:54:43 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.439.0; Thu, 5 Sep 2019 20:54:36 +0800 From: zhong jiang To: , , , CC: , , , , , , Subject: [PATCH 2/3] media: v4l2: Use FIELD_SIZEOF directly Date: Thu, 5 Sep 2019 20:51:35 +0800 Message-ID: <1567687896-19996-3-git-send-email-zhongjiang@huawei.com> X-Mailer: git-send-email 1.7.12.4 In-Reply-To: <1567687896-19996-1-git-send-email-zhongjiang@huawei.com> References: <1567687896-19996-1-git-send-email-zhongjiang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It's more clear to use FIELD_SIZEOF instead of its implementation. Signed-off-by: zhong jiang --- drivers/media/v4l2-core/v4l2-ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index 51b9127..eebea91 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -2637,7 +2637,7 @@ struct v4l2_ioctl_info { /* Zero struct from after the field to the end */ #define INFO_FL_CLEAR(v4l2_struct, field) \ ((offsetof(struct v4l2_struct, field) + \ - sizeof(((struct v4l2_struct *)0)->field)) << 16) + FIELD_SIZEOF(struct v4l2_struct, field)) << 16) #define INFO_FL_CLEAR_MASK (_IOC_SIZEMASK << 16) #define DEFINE_V4L_STUB_FUNC(_vidioc) \ -- 1.7.12.4