Re: [PATCH v3 24/27] staging: ccree: use a consistent file naming convention

2018-01-08 Thread Gilad Ben-Yossef
On Mon, Jan 8, 2018 at 5:28 PM, Greg Kroah-Hartman
 wrote:
> On Sun, Jan 07, 2018 at 12:14:35PM +, Gilad Ben-Yossef wrote:
>> The ccree driver source files were using an inconsistent
>> naming convention stemming from what the company was called
>> when they were added.
>>
>> Move to a single consistent naming convention for better
>> code readability.
>>
>> Signed-off-by: Gilad Ben-Yossef 
>> ---
>>  drivers/staging/ccree/Makefile   |6 +-
>>  drivers/staging/ccree/cc_aead.c  | 2709 
>> ++
>>  drivers/staging/ccree/cc_aead.h  |  109 ++
>>  drivers/staging/ccree/cc_buffer_mgr.c| 1657 ++
>>  drivers/staging/ccree/cc_buffer_mgr.h|   74 +
>>  drivers/staging/ccree/cc_cipher.c| 1171 +
>>  drivers/staging/ccree/cc_cipher.h|   74 +
>>  drivers/staging/ccree/cc_debugfs.c   |2 +-
>>  drivers/staging/ccree/cc_driver.c|  508 ++
>>  drivers/staging/ccree/cc_driver.h|  194 +++
>>  drivers/staging/ccree/cc_fips.c  |  112 ++
>>  drivers/staging/ccree/cc_fips.h  |   37 +
>>  drivers/staging/ccree/cc_hash.c  | 2299 +
>>  drivers/staging/ccree/cc_hash.h  |  114 ++
>>  drivers/staging/ccree/cc_host_regs.h |  142 ++
>>  drivers/staging/ccree/cc_hw_queue_defs.h |2 +-
>>  drivers/staging/ccree/cc_ivgen.c |  281 
>>  drivers/staging/ccree/cc_ivgen.h |   55 +
>>  drivers/staging/ccree/cc_kernel_regs.h   |  167 ++
>>  drivers/staging/ccree/cc_pm.c|  125 ++
>>  drivers/staging/ccree/cc_pm.h|   57 +
>>  drivers/staging/ccree/cc_request_mgr.c   |  719 
>>  drivers/staging/ccree/cc_request_mgr.h   |   51 +
>>  drivers/staging/ccree/cc_sram_mgr.c  |  107 ++
>>  drivers/staging/ccree/cc_sram_mgr.h  |   65 +
>>  drivers/staging/ccree/dx_crys_kernel.h   |  167 --
>>  drivers/staging/ccree/dx_host.h  |  142 --
>>  drivers/staging/ccree/ssi_aead.c | 2709 
>> --
>>  drivers/staging/ccree/ssi_aead.h |  109 --
>>  drivers/staging/ccree/ssi_buffer_mgr.c   | 1657 --
>>  drivers/staging/ccree/ssi_buffer_mgr.h   |   74 -
>>  drivers/staging/ccree/ssi_cipher.c   | 1171 -
>>  drivers/staging/ccree/ssi_cipher.h   |   74 -
>>  drivers/staging/ccree/ssi_driver.c   |  508 --
>>  drivers/staging/ccree/ssi_driver.h   |  194 ---
>>  drivers/staging/ccree/ssi_fips.c |  112 --
>>  drivers/staging/ccree/ssi_fips.h |   37 -
>>  drivers/staging/ccree/ssi_hash.c | 2299 -
>>  drivers/staging/ccree/ssi_hash.h |  114 --
>>  drivers/staging/ccree/ssi_ivgen.c|  281 
>>  drivers/staging/ccree/ssi_ivgen.h|   55 -
>>  drivers/staging/ccree/ssi_pm.c   |  125 --
>>  drivers/staging/ccree/ssi_pm.h   |   57 -
>>  drivers/staging/ccree/ssi_request_mgr.c  |  719 
>>  drivers/staging/ccree/ssi_request_mgr.h  |   51 -
>>  drivers/staging/ccree/ssi_sram_mgr.c |  107 --
>>  drivers/staging/ccree/ssi_sram_mgr.h |   65 -
>>  47 files changed, 10832 insertions(+), 10832 deletions(-)
>>  create mode 100644 drivers/staging/ccree/cc_aead.c
>>  create mode 100644 drivers/staging/ccree/cc_aead.h
>>  create mode 100644 drivers/staging/ccree/cc_buffer_mgr.c
>>  create mode 100644 drivers/staging/ccree/cc_buffer_mgr.h
>>  create mode 100644 drivers/staging/ccree/cc_cipher.c
>>  create mode 100644 drivers/staging/ccree/cc_cipher.h
>>  create mode 100644 drivers/staging/ccree/cc_driver.c
>>  create mode 100644 drivers/staging/ccree/cc_driver.h
>>  create mode 100644 drivers/staging/ccree/cc_fips.c
>>  create mode 100644 drivers/staging/ccree/cc_fips.h
>>  create mode 100644 drivers/staging/ccree/cc_hash.c
>>  create mode 100644 drivers/staging/ccree/cc_hash.h
>>  create mode 100644 drivers/staging/ccree/cc_host_regs.h
>>  create mode 100644 drivers/staging/ccree/cc_ivgen.c
>>  create mode 100644 drivers/staging/ccree/cc_ivgen.h
>>  create mode 100644 drivers/staging/ccree/cc_kernel_regs.h
>>  create mode 100644 drivers/staging/ccree/cc_pm.c
>>  create mode 100644 drivers/staging/ccree/cc_pm.h
>>  create mode 100644 drivers/staging/ccree/cc_request_mgr.c
>>  create mode 100644 drivers/staging/ccree/cc_request_mgr.h
>>  create mode 100644 drivers/staging/ccree/cc_sram_mgr.c
>>  create mode 100644 drivers/staging/ccree/cc_sram_mgr.h
>>  delete mode 100644 drivers/staging/ccree/dx_crys_kernel.h
>>  delete mode 100644 drivers/staging/ccree/dx_host.h
>>  delete mode 100644 drivers/staging/ccree/ssi_aead.c
>>  delete mode 100644 drivers/staging/ccree/ssi_aead.h
>>  delete mode 100644 drivers/staging/ccree/ssi_buffer_mgr.c
>>  delete mode 100644 drivers/staging/ccree/ssi_buffer_mgr.h
>>  delete mode 100644 drivers/staging/ccree/ssi_cipher.c
>>  delete mode 100644 drivers/staging/ccree/ssi_cipher.h
>>  delete mode 100644 drivers/staging/c

Re: [PATCH] crypto: clear htmldocs build warnings for crypto/hash

2018-01-08 Thread Herbert Xu
On Mon, Jan 08, 2018 at 05:43:18PM +0100, Kamil Konieczny wrote:

> Is it mandatory for both async hash and shash ?
> 
> in crypto/ahash.c in function
> 
> static int crypto_ahash_init_tfm(struct crypto_tfm *tfm)
> 
> there is:
> 
>   hash->export = ahash_no_export;
>   hash->import = ahash_no_import;
> 
> and later in the same function:
> 
>   if (alg->export)
>   hash->export = alg->export;
>   if (alg->import)
>   hash->import = alg->import;

That's just a leftover from the old days before we started requiring
them.  These should be removed so that the registration fails if
they're not provided.

The requirement has been in place for a while now and we have been
failing any algorithms with a zero statesize which is only used by
import/export.

Thanks,
-- 
Email: Herbert Xu 
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


[PATCH V2 1/2] clk: imx: imx7d: add the snvs clock

2018-01-08 Thread Anson Huang
According to the i.MX7D Reference Manual,
SNVS block has a clock gate, accessing SNVS block
would need this clock gate to be enabled, add it
into clock tree so that SNVS module driver can
operate this clock gate.

Signed-off-by: Anson Huang 
---
no changes since v1.
 drivers/clk/imx/clk-imx7d.c | 1 +
 include/dt-bindings/clock/imx7d-clock.h | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/imx/clk-imx7d.c b/drivers/clk/imx/clk-imx7d.c
index 80dc211..f34f1ec 100644
--- a/drivers/clk/imx/clk-imx7d.c
+++ b/drivers/clk/imx/clk-imx7d.c
@@ -795,6 +795,7 @@ static void __init imx7d_clocks_init(struct device_node 
*ccm_node)
clks[IMX7D_DRAM_PHYM_ALT_ROOT_CLK] = 
imx_clk_gate4("dram_phym_alt_root_clk", "dram_phym_alt_post_div", base + 
0x4130, 0);
clks[IMX7D_DRAM_ALT_ROOT_CLK] = imx_clk_gate4("dram_alt_root_clk", 
"dram_alt_post_div", base + 0x4130, 0);
clks[IMX7D_OCOTP_CLK] = imx_clk_gate4("ocotp_clk", "ipg_root_clk", base 
+ 0x4230, 0);
+   clks[IMX7D_SNVS_CLK] = imx_clk_gate4("snvs_clk", "ipg_root_clk", base + 
0x4250, 0);
clks[IMX7D_USB_HSIC_ROOT_CLK] = imx_clk_gate4("usb_hsic_root_clk", 
"usb_hsic_post_div", base + 0x4420, 0);
clks[IMX7D_SDMA_CORE_CLK] = imx_clk_gate4("sdma_root_clk", 
"ahb_root_clk", base + 0x4480, 0);
clks[IMX7D_PCIE_CTRL_ROOT_CLK] = imx_clk_gate4("pcie_ctrl_root_clk", 
"pcie_ctrl_post_div", base + 0x4600, 0);
diff --git a/include/dt-bindings/clock/imx7d-clock.h 
b/include/dt-bindings/clock/imx7d-clock.h
index e2f99ae..dc51904 100644
--- a/include/dt-bindings/clock/imx7d-clock.h
+++ b/include/dt-bindings/clock/imx7d-clock.h
@@ -452,5 +452,6 @@
 #define IMX7D_OCOTP_CLK439
 #define IMX7D_NAND_RAWNAND_CLK 440
 #define IMX7D_NAND_USDHC_BUS_RAWNAND_CLK 441
-#define IMX7D_CLK_END  442
+#define IMX7D_SNVS_CLK 442
+#define IMX7D_CLK_END  443
 #endif /* __DT_BINDINGS_CLOCK_IMX7D_H */
-- 
1.9.1



[PATCH V2 2/2] ARM: dts: imx7s: add snvs rtc clock

2018-01-08 Thread Anson Huang
Add i.MX7 SNVS RTC clock.

Signed-off-by: Anson Huang 
---
changes since v1:
update snvs lp rtc binding-doc for clock info.
 Documentation/devicetree/bindings/crypto/fsl-sec4.txt | 16 
 arch/arm/boot/dts/imx7s.dtsi  |  2 ++
 2 files changed, 18 insertions(+)

diff --git a/Documentation/devicetree/bindings/crypto/fsl-sec4.txt 
b/Documentation/devicetree/bindings/crypto/fsl-sec4.txt
index 76aec8a..da66ac4 100644
--- a/Documentation/devicetree/bindings/crypto/fsl-sec4.txt
+++ b/Documentation/devicetree/bindings/crypto/fsl-sec4.txt
@@ -415,12 +415,26 @@ Secure Non-Volatile Storage (SNVS) Low Power (LP) RTC Node
value type: 
Definition: LP register offset. default it is 0x34.
 
+   - clocks
+  Usage: required if SNVS LP RTC requires explicit enablement of clocks
+  Value type: 
+  Definition:  A list of phandle and clock specifier pairs describing
+  the clocks required for enabling and disabling SNVS LP RTC.
+
+   - clock-names
+  Usage: required if SNVS LP RTC requires explicit enablement of clocks
+  Value type: 
+  Definition: A list of clock name strings in the same order as the
+  clocks property.
+
 EXAMPLE
sec_mon_rtc_lp@1 {
compatible = "fsl,sec-v4.0-mon-rtc-lp";
interrupts = <93 2>;
regmap = <&snvs>;
offset = <0x34>;
+   clocks = <&clks IMX7D_SNVS_CLK>;
+   clock-names = "snvs-rtc";
};
 
 =
@@ -543,6 +557,8 @@ FULL EXAMPLE
regmap = <&sec_mon>;
offset = <0x34>;
interrupts = <93 2>;
+   clocks = <&clks IMX7D_SNVS_CLK>;
+   clock-names = "snvs-rtc";
};
 
snvs-pwrkey@020cc000 {
diff --git a/arch/arm/boot/dts/imx7s.dtsi b/arch/arm/boot/dts/imx7s.dtsi
index 9aa2bb9..02baf42 100644
--- a/arch/arm/boot/dts/imx7s.dtsi
+++ b/arch/arm/boot/dts/imx7s.dtsi
@@ -551,6 +551,8 @@
offset = <0x34>;
interrupts = ,
 ;
+   clocks = <&clks IMX7D_SNVS_CLK>;
+   clock-names = "snvs-rtc";
};
 
snvs_poweroff: snvs-poweroff {
-- 
1.9.1



Re: [PATCH 8/8] net: tipc: remove unused hardirq.h

2018-01-08 Thread Yang Shi



On 1/5/18 7:17 AM, David Miller wrote:

From: "Yang Shi" 
Date: Fri, 05 Jan 2018 06:46:48 +0800


Any more comment on this change?


These patches were not really submitted properly.

If you post a series, the series goes to one destination and
one tree.

If they are supposed to go to multiple trees, submit them
individually rather than as a series.  With clear indications
in the Subject lines which tree should be taking the patch.


Thanks for the comment. I will resend the net patches in a separate 
series to you.


Yang



Thank you.



Re: [PATCH] crypto: clear htmldocs build warnings for crypto/hash

2018-01-08 Thread Kamil Konieczny


On 08.01.2018 16:56, Herbert Xu wrote:
> On Mon, Jan 08, 2018 at 02:11:21PM +0100, Kamil Konieczny wrote:
>>
>>
>> On 07.01.2018 00:01, Tobin C. Harding wrote:
>>> SPHINX build emits multiple warnings of kind:
>>>
>>> warning: duplicate section name 'Note'
>>>
>>> (when building kernel via make target 'htmldocs')
>>>
>>> This is caused by repeated use of comments of form:
>>>
>>> * Note: soau soaeusoa uoe
>>>
>>> We can change the format without loss of clarity and clear the build
>>> warnings.
>>>
>>> Add '**[mandatory]**' or '**[optional]**' as kernel-doc field element
>>> description prefix
>>>
>>> This renders in HTML as (prefixes in bold)
>>>
>>> final
>>> [mandatory] Retrieve result from the driver. This function finalizes the
>>> transformation and retrieves the resulting hash from the driver and
>>> pushes it back to upper layers. No data processing happens at this
>>> point unless hardware requires it to finish the transformation (then
>>> the data buffered by the device driver is processed).
>>>
>>> Signed-off-by: Tobin C. Harding 
>>> ---
>>>
>>> This patch begs the question why the other members of struct ahash_alg
>>> are not marked? Some are marked 'optional' some 'mandatory'. It would
>>> seem that if the marking were necessary for some members it is necessary
>>> for all to eliminate ambiguity?
>>>
>>> thanks
>>
>> import, export are optional
> 
> No import/export must be implemented for all hashes.

Is it mandatory for both async hash and shash ?

in crypto/ahash.c in function

static int crypto_ahash_init_tfm(struct crypto_tfm *tfm)

there is:

hash->export = ahash_no_export;
hash->import = ahash_no_import;

and later in the same function:

if (alg->export)
hash->export = alg->export;
if (alg->import)
hash->import = alg->import;

-- 
Best regards,
Kamil Konieczny
Samsung R&D Institute Poland



Re: [PATCH v3 24/27] staging: ccree: use a consistent file naming convention

2018-01-08 Thread Greg Kroah-Hartman
On Sun, Jan 07, 2018 at 12:14:35PM +, Gilad Ben-Yossef wrote:
> The ccree driver source files were using an inconsistent
> naming convention stemming from what the company was called
> when they were added.
> 
> Move to a single consistent naming convention for better
> code readability.
> 
> Signed-off-by: Gilad Ben-Yossef 
> ---
>  drivers/staging/ccree/Makefile   |6 +-
>  drivers/staging/ccree/cc_aead.c  | 2709 
> ++
>  drivers/staging/ccree/cc_aead.h  |  109 ++
>  drivers/staging/ccree/cc_buffer_mgr.c| 1657 ++
>  drivers/staging/ccree/cc_buffer_mgr.h|   74 +
>  drivers/staging/ccree/cc_cipher.c| 1171 +
>  drivers/staging/ccree/cc_cipher.h|   74 +
>  drivers/staging/ccree/cc_debugfs.c   |2 +-
>  drivers/staging/ccree/cc_driver.c|  508 ++
>  drivers/staging/ccree/cc_driver.h|  194 +++
>  drivers/staging/ccree/cc_fips.c  |  112 ++
>  drivers/staging/ccree/cc_fips.h  |   37 +
>  drivers/staging/ccree/cc_hash.c  | 2299 +
>  drivers/staging/ccree/cc_hash.h  |  114 ++
>  drivers/staging/ccree/cc_host_regs.h |  142 ++
>  drivers/staging/ccree/cc_hw_queue_defs.h |2 +-
>  drivers/staging/ccree/cc_ivgen.c |  281 
>  drivers/staging/ccree/cc_ivgen.h |   55 +
>  drivers/staging/ccree/cc_kernel_regs.h   |  167 ++
>  drivers/staging/ccree/cc_pm.c|  125 ++
>  drivers/staging/ccree/cc_pm.h|   57 +
>  drivers/staging/ccree/cc_request_mgr.c   |  719 
>  drivers/staging/ccree/cc_request_mgr.h   |   51 +
>  drivers/staging/ccree/cc_sram_mgr.c  |  107 ++
>  drivers/staging/ccree/cc_sram_mgr.h  |   65 +
>  drivers/staging/ccree/dx_crys_kernel.h   |  167 --
>  drivers/staging/ccree/dx_host.h  |  142 --
>  drivers/staging/ccree/ssi_aead.c | 2709 
> --
>  drivers/staging/ccree/ssi_aead.h |  109 --
>  drivers/staging/ccree/ssi_buffer_mgr.c   | 1657 --
>  drivers/staging/ccree/ssi_buffer_mgr.h   |   74 -
>  drivers/staging/ccree/ssi_cipher.c   | 1171 -
>  drivers/staging/ccree/ssi_cipher.h   |   74 -
>  drivers/staging/ccree/ssi_driver.c   |  508 --
>  drivers/staging/ccree/ssi_driver.h   |  194 ---
>  drivers/staging/ccree/ssi_fips.c |  112 --
>  drivers/staging/ccree/ssi_fips.h |   37 -
>  drivers/staging/ccree/ssi_hash.c | 2299 -
>  drivers/staging/ccree/ssi_hash.h |  114 --
>  drivers/staging/ccree/ssi_ivgen.c|  281 
>  drivers/staging/ccree/ssi_ivgen.h|   55 -
>  drivers/staging/ccree/ssi_pm.c   |  125 --
>  drivers/staging/ccree/ssi_pm.h   |   57 -
>  drivers/staging/ccree/ssi_request_mgr.c  |  719 
>  drivers/staging/ccree/ssi_request_mgr.h  |   51 -
>  drivers/staging/ccree/ssi_sram_mgr.c |  107 --
>  drivers/staging/ccree/ssi_sram_mgr.h |   65 -
>  47 files changed, 10832 insertions(+), 10832 deletions(-)
>  create mode 100644 drivers/staging/ccree/cc_aead.c
>  create mode 100644 drivers/staging/ccree/cc_aead.h
>  create mode 100644 drivers/staging/ccree/cc_buffer_mgr.c
>  create mode 100644 drivers/staging/ccree/cc_buffer_mgr.h
>  create mode 100644 drivers/staging/ccree/cc_cipher.c
>  create mode 100644 drivers/staging/ccree/cc_cipher.h
>  create mode 100644 drivers/staging/ccree/cc_driver.c
>  create mode 100644 drivers/staging/ccree/cc_driver.h
>  create mode 100644 drivers/staging/ccree/cc_fips.c
>  create mode 100644 drivers/staging/ccree/cc_fips.h
>  create mode 100644 drivers/staging/ccree/cc_hash.c
>  create mode 100644 drivers/staging/ccree/cc_hash.h
>  create mode 100644 drivers/staging/ccree/cc_host_regs.h
>  create mode 100644 drivers/staging/ccree/cc_ivgen.c
>  create mode 100644 drivers/staging/ccree/cc_ivgen.h
>  create mode 100644 drivers/staging/ccree/cc_kernel_regs.h
>  create mode 100644 drivers/staging/ccree/cc_pm.c
>  create mode 100644 drivers/staging/ccree/cc_pm.h
>  create mode 100644 drivers/staging/ccree/cc_request_mgr.c
>  create mode 100644 drivers/staging/ccree/cc_request_mgr.h
>  create mode 100644 drivers/staging/ccree/cc_sram_mgr.c
>  create mode 100644 drivers/staging/ccree/cc_sram_mgr.h
>  delete mode 100644 drivers/staging/ccree/dx_crys_kernel.h
>  delete mode 100644 drivers/staging/ccree/dx_host.h
>  delete mode 100644 drivers/staging/ccree/ssi_aead.c
>  delete mode 100644 drivers/staging/ccree/ssi_aead.h
>  delete mode 100644 drivers/staging/ccree/ssi_buffer_mgr.c
>  delete mode 100644 drivers/staging/ccree/ssi_buffer_mgr.h
>  delete mode 100644 drivers/staging/ccree/ssi_cipher.c
>  delete mode 100644 drivers/staging/ccree/ssi_cipher.h
>  delete mode 100644 drivers/staging/ccree/ssi_driver.c
>  delete mode 100644 drivers/staging/ccree/ssi_driver.h
>  delete mode 100644 drivers/staging/ccree/ssi_fips.c
>  delete mode 1006

Re: [PATCH] staging: ccree: ssi_hash: remove unnecessary parentheses

2018-01-08 Thread Greg KH
On Thu, Dec 28, 2017 at 12:24:17PM +0200, Elad Wexler wrote:
> Fixed a coding style issue
> 
> Signed-off-by: Elad Wexler 
> ---
>  drivers/staging/ccree/ssi_hash.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Why did you send this twice?

> diff --git a/drivers/staging/ccree/ssi_hash.c 
> b/drivers/staging/ccree/ssi_hash.c
> index 2035835..8d56fa7 100644
> --- a/drivers/staging/ccree/ssi_hash.c
> +++ b/drivers/staging/ccree/ssi_hash.c
> @@ -2280,8 +2280,8 @@ int ssi_hash_alloc(struct ssi_drvdata *drvdata)
> &hash_handle->hash_list);
>   }
>  
> - if ((hw_mode == DRV_CIPHER_XCBC_MAC) ||
> - (hw_mode == DRV_CIPHER_CMAC))
> + if (hw_mode == DRV_CIPHER_XCBC_MAC ||
> + hw_mode == DRV_CIPHER_CMAC)

No, now I have to go look up if == or || comes in which order.  Ick,
just leave it as-is please.

thanks,

greg k-h


Re: [PATCH v2] hwrng: Clean up RNG list when last hwrng is unregistered

2018-01-08 Thread Gary R Hook

On 01/07/2018 11:05 PM, Herbert Xu wrote:

On Fri, Jan 05, 2018 at 11:28:23AM -0600, Gary R Hook wrote:


It may not have been obvious from the title but this fixes a bug
which will impact the use of any HW RNG that is the only RNG
registered. The breakage of rmmod/modprobe -r that this fix obviates
suggests that it needs to make the 4.15 kernel, please. Just want to
ensure this gets the proper attention. Thank you.


I don't think breaking rmmod is sufficiently serious to warrant
immediate inclusion at this point.  We can always send it via
stable after the release.

Thanks,



Oh. I just figured that problems introduced in a particular kernel level 
should be resolved (if possible) in that same level.


Your call, of course; thank you for the clarification.


Re: [PATCH] checkpatch: add *_ON_STACK to $declaration_macros

2018-01-08 Thread Gilad Ben-Yossef
On Wed, Dec 20, 2017 at 11:41 AM, Joe Perches  wrote:
> On Tue, 2017-06-27 at 10:55 +0300, Gilad Ben-Yossef wrote:
>> Add the crypto API *_ON_STACK to $declaration_macros.
>>
>> Resolves the following false warning:
>>
>> WARNING: Missing a blank line after declarations
>> + int err;
>> + SHASH_DESC_ON_STACK(desc, ctx_p->shash_tfm);
> []
>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> []
>> @@ -733,6 +733,7 @@ our $FuncArg = 
>> qr{$Typecast{0,1}($LvalOrFunc|$Constant|$String)};
>>  our $declaration_macros = qr{(?x:
>>   
>> (?:$Storage\s+)?(?:[A-Z_][A-Z0-9]*_){0,2}(?:DEFINE|DECLARE)(?:_[A-Z0-9]+){1,6}\s*\(|
>>   (?:$Storage\s+)?LIST_HEAD\s*\(|
>> + (?:$Storage\s+)?[A-Z_]*_ON_STACK\(|
>
> A few things:
>
> The crypto _ON_STACK declarations cannot have a $Storage type.
>
> There should be a \s* between the ON_STACK and the open parenthesis
>
> There are other _ON_STACK types than the crypto uses
>
> $ grep -rP --include=*.[ch] -oh "\b[A-Z_]+_ON_STACK\b" * | \
>   sort | uniq -c | sort -rn
>  68 SKCIPHER_REQUEST_ON_STACK
>  45 SHASH_DESC_ON_STACK
>  10 AHASH_REQUEST_ON_STACK
>   4 PC_LOC_ON_STACK
>   4 DECLARE_DPM_WATCHDOG_ON_STACK
>   3 HISI_SAS_DECLARE_RST_WORK_ON_STACK
>   3 CONFIG_ARCH_TASK_STRUCT_ON_STACK
>   1 PT_SIZE_ON_STACK
>   1 ALLOC_PT_GPREGS_ON_STACK
>
> So perhaps:
>
> (?:SKCIPHER_REQUEST|SHASH_DESC|AHASH_REQUEST)_ON_STACK\s*\(
>


Yes, it's better.

I'll send a v2.

Thanks,
Gilad

-- 
Gilad Ben-Yossef
Chief Coffee Drinker

"If you take a class in large-scale robotics, can you end up in a
situation where the homework eats your dog?"
 -- Jean-Baptiste Queru