From patchwork Fri Mar 15 09:32:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 160413 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp16528350jad; Fri, 15 Mar 2019 02:32:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqwmrRt7molea1JFivp0zTUHwhJvdY14DU/1GY8man90JmiT2jxwSsyjDhrg+Vzbjt9Ploy3 X-Received: by 2002:aa7:8ac8:: with SMTP id b8mr2054196pfd.87.1552642353743; Fri, 15 Mar 2019 02:32:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552642353; cv=none; d=google.com; s=arc-20160816; b=pcXHZjXZar/mSaZMLCUWbvca2E+09U+2N5jIQuQRZi7c+QZPhiQ1B33hJ4yvoMMNMR hMvTizeD8Kx0/Em5z2zxNl6K66QV0w8ajKxAffp2LrR28NC2crKG5oPxZKTs+/7pZBfg 1guUEG9jAVxiBTf8BNOdv4mLkZFfjAz2UkkuBZy1iqPBtwA7oiOnmz7Jz3sQUjzKtd17 gnlORbXACiDQuAsk/Ad0zYp5uffmanIZ+t4lb0hvXRaTuTthFZkDRXF8T2Ago78KZl6Y RUyuW+vzYTHQxTapMPuXOBKlCfEAenC0mKEhnhv/UBK3/VGqZ3R5OBuDnFQcXwyyTFE+ 7tuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=lnYpdY1RvqL9G6kpqzscMSNBpa01+DuYhbiy+zc6reA=; b=Wdws/hh/kMpIkuyOroLVgwC3y4oIEsNAlvg6s4I8hlK202o+bbzVVIV7XDGIsm3oCF vX4Ifc1h16B6aMjjr/vUr+WTdcJ5eH//UQL6Wu3NQsRJDITuhsjVxJUzo4kogxc1gr7F queEsLaj+zmLnvDI5bUXFGV+31WW/r9Gi3Xtz3nmIkVkPYeWhvqYt5vsE6tLUIkmvTLa DsBJkyJRHJPJch9sutmvavPuEiu0OUkCxgiuajQTaGV4liSB+oCDMHffveOK9oF17xwg j2ap7erNV8Tawffw9e0N3pWoTjTxbS4hmms7stKGu8Jx48FYd/gXpwNOGOPplVY6aq0w 4s7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="CVZOhr/S"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f64si1436524plb.302.2019.03.15.02.32.33; Fri, 15 Mar 2019 02:32:33 -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; dkim=pass header.i=@linaro.org header.s=google header.b="CVZOhr/S"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728737AbfCOJcc (ORCPT + 31 others); Fri, 15 Mar 2019 05:32:32 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:38496 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728714AbfCOJcb (ORCPT ); Fri, 15 Mar 2019 05:32:31 -0400 Received: by mail-wm1-f65.google.com with SMTP id a188so5293318wmf.3 for ; Fri, 15 Mar 2019 02:32:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=lnYpdY1RvqL9G6kpqzscMSNBpa01+DuYhbiy+zc6reA=; b=CVZOhr/Smx8dnmAp5WnKgUwdvbARVBQO53nRixMB4xJx6o2ynLjXC5uuyEVre78K9I M5CbOi33w0IrvRNpd2gIGUoAcB67fNLBdM9BvBepDe+LWTFSJUvixqxlzTKxL/BKaj3l GE25Rt53sSoNO2+cTCXN+o4hN+iC1jHwnVNP5LKDWoMnu5q+cqUSywASR2q/By7FUK2o xjVVyt85EDnppnCaoZqhivE8TrOIl0XFAR8i+IzeeYymGsJKGT+7TUi/HsTMQgDuK51S ggv18DfxJjWZ9XccriXGeQGAqKLrWloaTKehStJxQsZ4XhCeaf+FxAu/a17p97k0rPTR vLvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=lnYpdY1RvqL9G6kpqzscMSNBpa01+DuYhbiy+zc6reA=; b=Rn91YkjzsDh8sI4brZM1rAdreCnPLtt8f5zzveWz4VdEtIGnX0DI0jy0A/G4iT98WJ VOhm8b0zqW8mMOzk/B2fGUYBKHPhxNTI/LOhw49EOMY2X3PKYStDzTNvRYWN8x+4T4d3 rPd55jq7muCEGppHCGvAUklkg8AqKazzceZoWrL6Y775nwIx5IUa50d7j9oAhTpxGo/b +eYPI8AtL6Ukn6N4y6+ezJXRrOAQz3cHz8O49479uGFMlqLHzbxe+XNsdDYG3p5vwnHr us7hPKg1ui20o7Qq6ibNbKLuuDG8sjqTLXJW4fAuIgGgwLNupwkaFAc6K/cZ2BRbPGje LLPA== X-Gm-Message-State: APjAAAWdfGbTHqsoc9epK/L+MEVLkwCqj0AswC32n+Sb+kXonsuqi87k Pbw2wIEY9u5HLOYpjiTVo8z7Lw== X-Received: by 2002:a1c:b403:: with SMTP id d3mr1389069wmf.85.1552642349088; Fri, 15 Mar 2019 02:32:29 -0700 (PDT) Received: from mms-0440.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id d10sm3640890wrh.83.2019.03.15.02.32.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Mar 2019 02:32:28 -0700 (PDT) From: Stanimir Varbanov To: linux-media@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Mauro Carvalho Chehab , Hans Verkuil , Stanimir Varbanov Subject: [PATCH v2] venus: hfi_parser: fix Source Matcher errors Date: Fri, 15 Mar 2019 11:32:07 +0200 Message-Id: <20190315093207.2730-1-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This fixes following two smatch errors: hfi_parser.c:103 parse_profile_level() error: memcpy() 'proflevel' too small (8 vs 128) hfi_parser.c:129 parse_caps() error: memcpy() 'cap' too small (16 vs 512) by modifying structure members to flexible array members. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/hfi_helper.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/media/platform/qcom/venus/hfi_helper.h b/drivers/media/platform/qcom/venus/hfi_helper.h index 15804ad7e65d..a2b95ff79c4a 100644 --- a/drivers/media/platform/qcom/venus/hfi_helper.h +++ b/drivers/media/platform/qcom/venus/hfi_helper.h @@ -569,7 +569,7 @@ struct hfi_capability { struct hfi_capabilities { u32 num_capabilities; - struct hfi_capability data[1]; + struct hfi_capability data[]; }; #define HFI_DEBUG_MSG_LOW 0x01 @@ -726,7 +726,7 @@ struct hfi_profile_level { struct hfi_profile_level_supported { u32 profile_count; - struct hfi_profile_level profile_level[1]; + struct hfi_profile_level profile_level[]; }; struct hfi_quality_vs_speed {