From nobody Fri Oct 3 12:13:10 2025 Received: from mail-wr1-f73.google.com (mail-wr1-f73.google.com [209.85.221.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 908AA304967 for ; Mon, 1 Sep 2025 09:10:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756717861; cv=none; b=Pr7GYF3Q/EZC6QG8P/VTXTPhgPslMQ8Can/3dT4EydHISGSz9LrDomoXf0L3mtugNgXI5N8WGQZf8lApq7pL7RUor6GP8yQWALHXE9O89/Nq+mond//CgZ1OvIcsDmnxDQZaJMmiOM/q7veRNRS+XUjXD0EakWAGxyj2zE5Qxt4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756717861; c=relaxed/simple; bh=32DTjO7qjxKOvL3amKcERtyKwvz65XaqH4dROuOpLPo=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=BsBuMawZGE346lCYyzd2JudZ3tTuzwJ065qiHBb803hW7QGuRyrmuZaMlY5St14nc874hnRy3ZY3XF2KwC3tSqk5DPayZwlKgetJAzgBYEA9lmJ4UQ3TDG6wqe4GtVYUKamv+P+VQTbgBnM/7IO7TAf32nnqCNQjihV/r4cnc8c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--abarnas.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=iy5Aa7ME; arc=none smtp.client-ip=209.85.221.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--abarnas.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="iy5Aa7ME" Received: by mail-wr1-f73.google.com with SMTP id ffacd0b85a97d-3d1114879a4so1215584f8f.0 for ; Mon, 01 Sep 2025 02:10:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1756717857; x=1757322657; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=4MO71ArN1mhEwmcVWMgSdyViUKfjpUyop6LWKe1mWCU=; b=iy5Aa7MESAes87Q1xuWQB39Om5wJJHXSr/WA2u5CykYlE9f+WclyPt00ydxJpFFSX/ tBJrXLsH9fJAiKIm150c3JHSL2HuxR1nEW6d45GlZibOB5P/qnWLVqTyYtSaKmmMzGsk LvytEMYvYZKw9Fp/2igREwFyCTaiqDPWxWhXld3aDW6fSsXnlsiU/aujxw4aJwWdFEtv V6yQmT7J+aEwKT2P9liethgg9gAGJKOVrxV5PB6dxhISr64AloChi6PieCwJUaLNKKgL Nkz0dtv8VcM4GvoZKN0vdaaK7x6psABR2dQ4i56IWbHPKxYSWy6dOyf5rY7ITpbYMsny +X4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756717857; x=1757322657; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=4MO71ArN1mhEwmcVWMgSdyViUKfjpUyop6LWKe1mWCU=; b=cUkZleJgBpXzCpGS9sbBGSLr+RFJ+GqQxyUS2uvi2P2h6Ne/hHIYCZjpByOBR1/E9X bA1+Q4mzRryWs+Enypih41mzc8r4q5/B9cuc+q9s9OR0OVNxyPfCxlJpWpSh58wvM5Zz ya/Tldw/pNypDN5vTmbi8vZ30cM/3GiM93R8omWaLJfXbCGySqvJS4w7oi5PQgSngMwz Jo6U54qbs1JXU4ZZ7H8L6AANsOSxvv96K7RvJp1gmYIDxsHH54il2eztFLEvkR1UPTt5 ZFlS7FkZja9YRxjaaLdMqNXsfy/4XIh0iaLToNphcypkua9dfZFvpwD3g2VhmxDg/bTy 8gdg== X-Forwarded-Encrypted: i=1; AJvYcCVVxopQYmiIpjGRN//TXRhLzhf8YY1V9eB1SJQlO/rEQCLe6knIZVTnDCtEjUn1w6kDvNKiVhDB2O9LOY0=@vger.kernel.org X-Gm-Message-State: AOJu0YxwXhbNzcRAv3njXLAz6FytQNM+S5GIZWeIJiJJyFANKEV/K8zN jWAvEnXKiEbOxn+7TmwlOss8ecf4MyqcHRI8djPUV26EllgWIaB7k+uiXcsSI7JDgC79EJvieNG CwP0INaSilg== X-Google-Smtp-Source: AGHT+IEjN14c7eBq9IeAZMawq9X7egcWbk2lkf6mfQDOhK7ZFvaXNjsL5u4jyo+cPT9JUe+5yBTQuBUbseKy X-Received: from wrf23.prod.google.com ([2002:a05:6000:43d7:b0:3d7:c499:56f]) (user=abarnas job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:1ace:b0:3cd:9213:7e3e with SMTP id ffacd0b85a97d-3d1e00dd3dbmr5497203f8f.43.1756717856829; Mon, 01 Sep 2025 02:10:56 -0700 (PDT) Date: Mon, 1 Sep 2025 09:10:49 +0000 In-Reply-To: <20250901091050.1935505-1-abarnas@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20250901091050.1935505-1-abarnas@google.com> X-Mailer: git-send-email 2.51.0.318.gd7df087d1a-goog Message-ID: <20250901091050.1935505-2-abarnas@google.com> Subject: [PATCH 1/2] staging: media: atomisp: Remove typedefs for basic types in vmem.c From: "=?UTF-8?q?Adrian=20Barna=C5=9B?=" To: Hans de Goede , Mauro Carvalho Chehab , Sakari Ailus , Andy Shevchenko , Greg Kroah-Hartman , Dan Carpenter , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Cc: "=?UTF-8?q?Adrian=20Barna=C5=9B?=" Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Cleared typedefs hiding unsigned long long type, to align with kernel coding style. Signed-off-by: Adrian Barna=C5=9B --- .../pci/hive_isp_css_common/host/vmem.c | 42 +++++++++---------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/vme= m.c b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/vmem.c index 722b684fbc37..fd640e100591 100644 --- a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/vmem.c +++ b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/vmem.c @@ -13,35 +13,33 @@ #endif #include "assert_support.h" =20 -typedef unsigned long long hive_uedge; -typedef hive_uedge *hive_wide; =20 /* Copied from SDK: sim_semantics.c */ =20 /* subword bits move like this: MSB[____xxxx____]LSB -> MSB[000000= 00xxxx]LSB */ -static inline hive_uedge -subword(hive_uedge w, unsigned int start, unsigned int end) +static inline unsigned long long +subword(unsigned long long w, unsigned int start, unsigned int end) { return (w & (((1ULL << (end - 1)) - 1) << 1 | 1)) >> start; } =20 /* inverse subword bits move like this: MSB[xxxx____xxxx]LSB -> MSB[xxxx00= 00xxxx]LSB */ -static inline hive_uedge -inv_subword(hive_uedge w, unsigned int start, unsigned int end) +static inline unsigned long long +inv_subword(unsigned long long w, unsigned int start, unsigned int end) { return w & (~(((1ULL << (end - 1)) - 1) << 1 | 1) | ((1ULL << start) - 1)= ); } =20 -#define uedge_bits (8 * sizeof(hive_uedge)) +#define uedge_bits (8 * sizeof(unsigned long long)) #define move_lower_bits(target, target_bit, src, src_bit) move_subword(tar= get, target_bit, src, 0, src_bit) #define move_upper_bits(target, target_bit, src, src_bit) move_subword(tar= get, target_bit, src, src_bit, uedge_bits) #define move_word(target, target_bit, src) move_subword(target, target_bit= , src, 0, uedge_bits) =20 static void move_subword( - hive_uedge *target, + unsigned long long *target, unsigned int target_bit, - hive_uedge src, + unsigned long long src, unsigned int src_start, unsigned int src_end) { @@ -49,18 +47,18 @@ move_subword( unsigned int start_bit =3D target_bit % uedge_bits; unsigned int subword_width =3D src_end - src_start; =20 - hive_uedge src_subword =3D subword(src, src_start, src_end); + unsigned long long src_subword =3D subword(src, src_start, src_end); =20 if (subword_width + start_bit > uedge_bits) { /* overlap */ - hive_uedge old_val1; - hive_uedge old_val0 =3D inv_subword(target[start_elem], start_bit, uedge= _bits); + unsigned long long old_val1; + unsigned long long old_val0 =3D inv_subword(target[start_elem], start_bi= t, uedge_bits); =20 target[start_elem] =3D old_val0 | (src_subword << start_bit); old_val1 =3D inv_subword(target[start_elem + 1], 0, subword_width + start_bit - uedge_bits); target[start_elem + 1] =3D old_val1 | (src_subword >> (uedge_bits - star= t_bit)); } else { - hive_uedge old_val =3D inv_subword(target[start_elem], start_bit, + unsigned long long old_val =3D inv_subword(target[start_elem], start_bit, start_bit + subword_width); =20 target[start_elem] =3D old_val | (src_subword << start_bit); @@ -69,8 +67,8 @@ move_subword( =20 static void hive_sim_wide_unpack( - hive_wide vector, - hive_wide elem, + unsigned long long *vector, + unsigned long long *elem, hive_uint elem_bits, hive_uint index) { @@ -103,8 +101,8 @@ hive_sim_wide_unpack( =20 static void hive_sim_wide_pack( - hive_wide vector, - hive_wide elem, + unsigned long long *vector, + unsigned long long *elem, hive_uint elem_bits, hive_uint index) { @@ -136,7 +134,7 @@ static void load_vector( const t_vmem_elem *from) { unsigned int i; - hive_uedge *data; + unsigned long long *data; unsigned int size =3D sizeof(short) * ISP_NWAY; =20 VMEM_ARRAY(v, 2 * ISP_NWAY); /* Need 2 vectors to work around vmem hss bu= g */ @@ -146,9 +144,9 @@ static void load_vector( #else hrt_master_port_load(ISP_BAMEM_BASE[ID] + (unsigned long)from, &v[0][0], = size); #endif - data =3D (hive_uedge *)v; + data =3D (unsigned long long *)v; for (i =3D 0; i < ISP_NWAY; i++) { - hive_uedge elem =3D 0; + unsigned long long elem =3D 0; =20 hive_sim_wide_unpack(data, &elem, ISP_VEC_ELEMBITS, i); to[i] =3D elem; @@ -166,10 +164,10 @@ static void store_vector( =20 VMEM_ARRAY(v, 2 * ISP_NWAY); /* Need 2 vectors to work around vmem hss bu= g */ //load_vector (&v[1][0], &to[ISP_NWAY]); /* Fetch the next vector, since = it will be overwritten. */ - hive_uedge *data =3D (hive_uedge *)v; + unsigned long long *data =3D (unsigned long long *)v; =20 for (i =3D 0; i < ISP_NWAY; i++) { - hive_sim_wide_pack(data, (hive_wide)&from[i], ISP_VEC_ELEMBITS, i); + hive_sim_wide_pack(data, (unsigned long long *)&from[i], ISP_VEC_ELEMBIT= S, i); } assert(ISP_BAMEM_BASE[ID] !=3D (hrt_address) - 1); #if !defined(HRT_MEMORY_ACCESS) --=20 2.51.0.318.gd7df087d1a-goog From nobody Fri Oct 3 12:13:10 2025 Received: from mail-ed1-f74.google.com (mail-ed1-f74.google.com [209.85.208.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF6B33054F4 for ; Mon, 1 Sep 2025 09:11:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756717866; cv=none; b=gFjyZYaxAigwgzxedOJjSXzYOgmQkKQ5mGYD05VyDzIt88kY2fUeAb5nMrS/ODq4vPqPxjjUUp4u0qsW0Z9B1RJV8RQkGlAkj0lf5NCsQmyIZFtwuuSarlK7dxbrQ07e0wadg8ki3NB3V3Hc4A5ieFEz7FLjcMyCaX99EBDd68E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756717866; c=relaxed/simple; bh=C6PSeroBBAXUkCfk//yXsUzvuy7IJKNHAggHy7Mv74s=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=OcLZkaM8Xp1xMe0ca97Sa4YHx+gxay2dRvvZeOUDnMu1nSQF8Lae6ViQ7qxmcv9QjdkNqnIsw+h/hYkyb9fSMv8whZqCQ+WWCFiJFp0S0olEoFfqVUf1grPXObVU8ZH2gRld7si1xqyIDQem3Z4A0bpYHrV/lFDhm0R5z4SQr7g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--abarnas.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=MwqZW8nA; arc=none smtp.client-ip=209.85.208.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--abarnas.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="MwqZW8nA" Received: by mail-ed1-f74.google.com with SMTP id 4fb4d7f45d1cf-61d2ab4bcbeso1740816a12.1 for ; Mon, 01 Sep 2025 02:11:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1756717863; x=1757322663; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=w0cook3tZu/pahjAdhVSuHrsuCcIggtxoSDo9eGj8lY=; b=MwqZW8nAtyuMlF7B2RBeVETH9FrSyktN1GKc8kQX/7DQ8o50W7y0KgSt9zUXEWQSZA ylpXJ2l7m0ItjUSR7zrwbQXF5XXaY9E3MGwUbmMEmuy/8CatiW9RDcBqTL1Ywh3wdxvI N48/n+e1pNOv1oIIL0zk18lY0ZXHAO1IhpFhvL5oiHgj8Kz1AZfi/i0MQyboU4M5oHol xo7bKZUeESQKVrFQAREOeFWajOP3BkCWT9VnrqdX1exmLF3aj4KBlHCzIEGeaeFWuSzk /xtA2L2MM5BqtwKiiiqeYJjhZzo0k0gwoM9wSkPGhOH195Rq9Z5DuLhDFeLdegfBKgHP i/fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756717863; x=1757322663; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=w0cook3tZu/pahjAdhVSuHrsuCcIggtxoSDo9eGj8lY=; b=BnrKs3oMDmc7W7hgjIpfqUPBS8T71ku11SvFTVRRor+ZfOMHWiLGOWBRNjx7GMaDQN kZMndavF6n3eX/G4rJ4Bl5nXLXl21M9lcLhUxdysE5ku4qEaKZG4lFE5vrLRKNDnTX0Z aMubEHjq/NcOjtKBVzHCZyW3bczsY4hyl0zJvqthmWKQMUZn/4p//YsViQKYSZWpYdHI g7K5zN/NovQnlR9YXABrGSE7ojfTuQkwdZ5DabBL4ybf9G/Mqj6N/yWGj6SELwBZxICD hqhOxZ6Z7npyN3fkgp2aOIkriKQAxuNB+MtvFc+8bz0Cs41b4qLvXMO2RM6ODWBwso45 +DNw== X-Forwarded-Encrypted: i=1; AJvYcCUo0z/z2Uibh9XRwfcfmkJQ8rC6VIQVFG0UQysN4cIgL9Jaq5ep/aopTdk7v4da51ECje5oEA3qv5yoKc4=@vger.kernel.org X-Gm-Message-State: AOJu0YybEOS9odzF83tr+I+4gZ5364KoLA+EfLnW1sr00f8mGM+iALDR j9Gdkx80+t67fiUP4tIisQH4D3FYInAEglDMJs51IFjvz/ZFWknnfXN0GdZj1fXP6cxnvWn5vdg i7onjdKXf6Q== X-Google-Smtp-Source: AGHT+IF4+qEShLjVFt7BDIbHBSFiIQP/xPnM97kkCf5E+r9Z0xWv6LIr8w+OXj7NGIbaiVsTggH4G2R4LI8M X-Received: from edj28.prod.google.com ([2002:a05:6402:325c:b0:61c:59a0:3f3b]) (user=abarnas job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6402:52cb:b0:609:9115:60f1 with SMTP id 4fb4d7f45d1cf-61d2699f676mr5835853a12.16.1756717857779; Mon, 01 Sep 2025 02:10:57 -0700 (PDT) Date: Mon, 1 Sep 2025 09:10:50 +0000 In-Reply-To: <20250901091050.1935505-1-abarnas@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20250901091050.1935505-1-abarnas@google.com> X-Mailer: git-send-email 2.51.0.318.gd7df087d1a-goog Message-ID: <20250901091050.1935505-3-abarnas@google.com> Subject: [PATCH 2/2] staging:media: atomisp: Whitespaces cleanup in vmem.c From: "=?UTF-8?q?Adrian=20Barna=C5=9B?=" To: Hans de Goede , Mauro Carvalho Chehab , Sakari Ailus , Andy Shevchenko , Greg Kroah-Hartman , Dan Carpenter , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Cc: "=?UTF-8?q?Adrian=20Barna=C5=9B?=" Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Whitespaces cleanup to conform with kernel style and improve readability. Signed-off-by: Adrian Barna=C5=9B --- .../pci/hive_isp_css_common/host/vmem.c | 91 ++++++------------- 1 file changed, 27 insertions(+), 64 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/vme= m.c b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/vmem.c index fd640e100591..d8a9aaa7b302 100644 --- a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/vmem.c +++ b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/vmem.c @@ -13,19 +13,18 @@ #endif #include "assert_support.h" =20 - /* Copied from SDK: sim_semantics.c */ =20 /* subword bits move like this: MSB[____xxxx____]LSB -> MSB[000000= 00xxxx]LSB */ -static inline unsigned long long -subword(unsigned long long w, unsigned int start, unsigned int end) +static inline unsigned long long subword(unsigned long long w, unsigned in= t start, + unsigned int end) { return (w & (((1ULL << (end - 1)) - 1) << 1 | 1)) >> start; } =20 /* inverse subword bits move like this: MSB[xxxx____xxxx]LSB -> MSB[xxxx00= 00xxxx]LSB */ -static inline unsigned long long -inv_subword(unsigned long long w, unsigned int start, unsigned int end) +static inline unsigned long long inv_subword(unsigned long long w, unsigne= d int start, + unsigned int end) { return w & (~(((1ULL << (end - 1)) - 1) << 1 | 1) | ((1ULL << start) - 1)= ); } @@ -35,13 +34,8 @@ inv_subword(unsigned long long w, unsigned int start, un= signed int end) #define move_upper_bits(target, target_bit, src, src_bit) move_subword(tar= get, target_bit, src, src_bit, uedge_bits) #define move_word(target, target_bit, src) move_subword(target, target_bit= , src, 0, uedge_bits) =20 -static void -move_subword( - unsigned long long *target, - unsigned int target_bit, - unsigned long long src, - unsigned int src_start, - unsigned int src_end) +static void move_subword(unsigned long long *target, unsigned int target_b= it, + unsigned long long src, unsigned int src_start, unsigned int src_end) { unsigned int start_elem =3D target_bit / uedge_bits; unsigned int start_bit =3D target_bit % uedge_bits; @@ -51,7 +45,8 @@ move_subword( =20 if (subword_width + start_bit > uedge_bits) { /* overlap */ unsigned long long old_val1; - unsigned long long old_val0 =3D inv_subword(target[start_elem], start_bi= t, uedge_bits); + unsigned long long old_val0 =3D inv_subword(target[start_elem], + start_bit, uedge_bits); =20 target[start_elem] =3D old_val0 | (src_subword << start_bit); old_val1 =3D inv_subword(target[start_elem + 1], 0, @@ -59,18 +54,14 @@ move_subword( target[start_elem + 1] =3D old_val1 | (src_subword >> (uedge_bits - star= t_bit)); } else { unsigned long long old_val =3D inv_subword(target[start_elem], start_bit, - start_bit + subword_width); + start_bit + subword_width); =20 target[start_elem] =3D old_val | (src_subword << start_bit); } } =20 -static void -hive_sim_wide_unpack( - unsigned long long *vector, - unsigned long long *elem, - hive_uint elem_bits, - hive_uint index) +static void hive_sim_wide_unpack(unsigned long long *vector, unsigned long= long *elem, + hive_uint elem_bits, hive_uint index) { /* pointers into wide_type: */ unsigned int start_elem =3D (elem_bits * index) / uedge_bits; @@ -99,12 +90,8 @@ hive_sim_wide_unpack( } } =20 -static void -hive_sim_wide_pack( - unsigned long long *vector, - unsigned long long *elem, - hive_uint elem_bits, - hive_uint index) +static void hive_sim_wide_pack(unsigned long long *vector, unsigned long l= ong *elem, + hive_uint elem_bits, hive_uint index) { /* pointers into wide_type: */ unsigned int start_elem =3D (elem_bits * index) / uedge_bits; @@ -128,10 +115,7 @@ hive_sim_wide_pack( } } =20 -static void load_vector( - const isp_ID_t ID, - t_vmem_elem *to, - const t_vmem_elem *from) +static void load_vector(const isp_ID_t ID, t_vmem_elem *to, const t_vmem_e= lem *from) { unsigned int i; unsigned long long *data; @@ -154,10 +138,7 @@ static void load_vector( udelay(1); /* Spend at least 1 cycles per vector */ } =20 -static void store_vector( - const isp_ID_t ID, - t_vmem_elem *to, - const t_vmem_elem *from) +static void store_vector(const isp_ID_t ID, t_vmem_elem *to, const t_vmem_= elem *from) { unsigned int i; unsigned int size =3D sizeof(short) * ISP_NWAY; @@ -166,9 +147,9 @@ static void store_vector( //load_vector (&v[1][0], &to[ISP_NWAY]); /* Fetch the next vector, since = it will be overwritten. */ unsigned long long *data =3D (unsigned long long *)v; =20 - for (i =3D 0; i < ISP_NWAY; i++) { + for (i =3D 0; i < ISP_NWAY; i++) hive_sim_wide_pack(data, (unsigned long long *)&from[i], ISP_VEC_ELEMBIT= S, i); - } + assert(ISP_BAMEM_BASE[ID] !=3D (hrt_address) - 1); #if !defined(HRT_MEMORY_ACCESS) ia_css_device_store(ISP_BAMEM_BASE[ID] + (unsigned long)to, &v, size); @@ -179,11 +160,8 @@ static void store_vector( udelay(1); /* Spend at least 1 cycles per vector */ } =20 -void isp_vmem_load( - const isp_ID_t ID, - const t_vmem_elem *from, - t_vmem_elem *to, - unsigned int elems) /* In t_vmem_elem */ +void isp_vmem_load(const isp_ID_t ID, const t_vmem_elem *from, t_vmem_elem= *to, + unsigned int elems) /* In t_vmem_elem */ { unsigned int c; const t_vmem_elem *vp =3D from; @@ -197,11 +175,8 @@ void isp_vmem_load( } } =20 -void isp_vmem_store( - const isp_ID_t ID, - t_vmem_elem *to, - const t_vmem_elem *from, - unsigned int elems) /* In t_vmem_elem */ +void isp_vmem_store(const isp_ID_t ID, t_vmem_elem *to, const t_vmem_elem = *from, + unsigned int elems) /* In t_vmem_elem */ { unsigned int c; t_vmem_elem *vp =3D to; @@ -215,15 +190,9 @@ void isp_vmem_store( } } =20 -void isp_vmem_2d_load( - const isp_ID_t ID, - const t_vmem_elem *from, - t_vmem_elem *to, - unsigned int height, - unsigned int width, - unsigned int stride_to, /* In t_vmem_elem */ - - unsigned stride_from /* In t_vmem_elem */) +void isp_vmem_2d_load(const isp_ID_t ID, const t_vmem_elem *from, t_vmem_e= lem *to, + unsigned int height, unsigned int width, + unsigned int stride_to, unsigned int stride_from) /* In t_vmem_ele= m */ { unsigned int h; =20 @@ -244,15 +213,9 @@ void isp_vmem_2d_load( } } =20 -void isp_vmem_2d_store( - const isp_ID_t ID, - t_vmem_elem *to, - const t_vmem_elem *from, - unsigned int height, - unsigned int width, - unsigned int stride_to, /* In t_vmem_elem */ - - unsigned stride_from /* In t_vmem_elem */) +void isp_vmem_2d_store(const isp_ID_t ID, t_vmem_elem *to, const t_vmem_el= em *from, + unsigned int height, unsigned int width, + unsigned int stride_to, unsigned int stride_from) /* In t_vmem_el= em */ { unsigned int h; =20 --=20 2.51.0.318.gd7df087d1a-goog