RE: [PATCH 3/3] [PATCH] staging: greybus: __u8 is sufficient for snd_ctl_elem_type_t and snd_ctl_elem_iface_t
From: Coiby Xu > Sent: 25 September 2020 15:11 > > On Thu, Sep 24, 2020 at 10:54:50AM +, David Laight wrote: > >From: Coiby Xu > >> Sent: 24 September 2020 11:21 > >> Use __8 to replace int and remove the unnecessary __bitwise type attribute. > >> > >> Found by sparse, > >... > >> diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h > >> index 535a7229e1d9..8e71a95644ab 100644 > >> --- a/include/uapi/sound/asound.h > >> +++ b/include/uapi/sound/asound.h > >> @@ -950,7 +950,7 @@ struct snd_ctl_card_info { > >>unsigned char components[128]; /* card components / fine > >> identification, delimited with one > >> space (AC97 etc..) */ > >> }; > >> > >> -typedef int __bitwise snd_ctl_elem_type_t; > >> +typedef __u8 snd_ctl_elem_type_t; > >> #define SNDRV_CTL_ELEM_TYPE_NONE((__force snd_ctl_elem_type_t) > >> 0) /* invalid */ > >> #define SNDRV_CTL_ELEM_TYPE_BOOLEAN ((__force snd_ctl_elem_type_t) > >> 1) /* boolean type */ > >> #define SNDRV_CTL_ELEM_TYPE_INTEGER ((__force snd_ctl_elem_type_t) > >> 2) /* integer type */ > > > >WTF is all that about anyway?? > >What is wrong with: > >#define SNDRV_CTL_ELEM_TYPE_NONE0u /* invalid */ > > I'm sorry I don't quite understand you. Are you suggesting > SNDRV_CTL_ELEM_TYPE_NONE > isn't needed in the first place? No, just remove all the casts from the constants. Are the types even used anywhere else? David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales) ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
TRANSACTION
Dear Sir, May I humbly solicit your confidence Over This Transaction, I decided to contact you after going to your profile , as I wish to repose my confidence on your discreteness and ability in transaction of this Nature. Let me start by introducing self properly to you, my Name is Mr. Patrick G. Cisse , I am the Regional Bank Manager of BOA CI , I came to know about you in my Private Search for a Reliable and Reputable foreigner to handle this Confidential Transaction. On the course of 2015/2016 Year Report, we discovered an excess profit of Seventeen Million One Hundred Thousand Us Dollars , [ $ 17,100,000.00 ] ; We have Since placed this fund on SUSPENSE ACCOUNT without any Beneficiary. As an officer of the bank, I can't be directly Connected to this Fund for Security Reasons, that is why I am contacting you for us to work together as Partners to Receive the said Fund into your Account for INVESTMENT in your Country. The percentage Ratio is thus: 40% for you , 60 % for me and my colleagues . Note: There is Practically No Risks Involved in this Transaction , it is 100% Risk Free and Shall Be Legally Bounded, All You Need to do is to Stand as the BENEFICIARY to the Deposit for a Proper Wire to Your Account .If you Find this Proposal Suitable For you, get back For Full Details and Procedures . Best regards, Mr. Patrick Cisse ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v5 8/9] arm64: dts: rockchip: add isp0 node for rk3399
Hi Helen, On Wed, Jul 22, 2020 at 12:55:32PM -0300, Helen Koike wrote: > From: Shunqian Zheng > > RK3399 has two ISPs, but only isp0 was tested. > Add isp0 node in rk3399 dtsi > > Verified with: > make ARCH=arm64 dtbs_check > DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/rockchip-isp1.yaml > > Signed-off-by: Shunqian Zheng > Signed-off-by: Jacob Chen > Signed-off-by: Helen Koike > > --- > > V4: > - update clock names > > V3: > - clean up clocks > > V2: > - re-order power-domains property > > V1: > This patch was originally part of this patchset: > > https://patchwork.kernel.org/patch/10267431/ > > The only difference is: > - add phy properties > - add ports > --- > arch/arm64/boot/dts/rockchip/rk3399.dtsi | 25 > 1 file changed, 25 insertions(+) > > diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi > b/arch/arm64/boot/dts/rockchip/rk3399.dtsi > index dba9641947a3a..ed8ba75dbbce8 100644 > --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi > +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi > @@ -1721,6 +1721,31 @@ vopb_mmu: iommu@ff903f00 { > status = "disabled"; > }; > > + isp0: isp0@ff91 { > + compatible = "rockchip,rk3399-cif-isp"; > + reg = <0x0 0xff91 0x0 0x4000>; > + interrupts = ; > + clocks = <&cru SCLK_ISP0>, > + <&cru ACLK_ISP0_WRAPPER>, > + <&cru HCLK_ISP0_WRAPPER>; > + clock-names = "isp", "aclk", "hclk"; > + iommus = <&isp0_mmu>; > + phys = <&mipi_dphy_rx0>; > + phy-names = "dphy"; > + power-domains = <&power RK3399_PD_ISP0>; Should this have status = "disabled" too? The mipi_dphy_rx0 node is disabled by default too, so in the default configuration the driver would always fail to probe. Best regards, Tomasz ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v5 0/9] move Rockchip ISP bindings out of staging / add ISP DT nodes for RK3399
Hi Helen, On Wed, Jul 22, 2020 at 12:55:24PM -0300, Helen Koike wrote: > Move the bindings out of drivers/staging and place them in > Documentation/devicetree/bindings instead. > > Also, add DT nodes for RK3399 and verify with make ARCH=arm64 dtbs_check > and make ARCH=arm64 dt_binding_check. > > Tested by verifying images streamed from Scarlet Chromebook > > Changes in v5: > - Drop unit addresses in dt-bindings example for simplification and fix > errors as suggested by Rob Herring in previous version > - Fix typos > - Re-write clock organization with if/then schema > Besides one comment to patch 8/9, Reviewed-by: Tomasz Figa Best regards, Tomasz ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 00/11] Introduce Simple atomic and non-atomic counters
On Fri, Sep 25, 2020 at 05:47:14PM -0600, Shuah Khan wrote: > This patch series is a result of discussion at the refcount_t BOF > the Linux Plumbers Conference. In this discussion, we identified > a need for looking closely and investigating atomic_t usages in > the kernel when it is used strictly as a counter without it > controlling object lifetimes and state changes. BTW, I realized the KSPP issue tracker hadn't broken this task out of the refcount_t conversion issue[1] into a separate issue, so I've created it now: https://github.com/KSPP/linux/issues/106 -Kees [1] https://github.com/KSPP/linux/issues/104 -- Kees Cook ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 00/11] Introduce Simple atomic and non-atomic counters
On Fri, Sep 25, 2020 at 05:47:14PM -0600, Shuah Khan wrote: >7. Verified that the test module compiles in kunit env. and test > module can be loaded to run the test. I meant write it using KUnit interfaces (e.g. KUNIT_EXPECT*(), kunit_test_suite(), etc): https://www.kernel.org/doc/html/latest/dev-tools/kunit/ Though I see the docs are still not updated[1] to reflect the Kconfig (CONFIG_foo_KUNIT_TEST) and file naming conventions (foo_kunit.c). -Kees [1] https://lore.kernel.org/lkml/20200911042404.3598910-1-david...@google.com/ -- Kees Cook ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 00/11] Introduce Simple atomic and non-atomic counters
On Fri, Sep 25, 2020 at 06:13:37PM -0600, Shuah Khan wrote: > On 9/25/20 5:52 PM, Kees Cook wrote: > > On Fri, Sep 25, 2020 at 05:47:14PM -0600, Shuah Khan wrote: > > > -- Addressed Kees's comments: > > > 1. Non-atomic counters renamed to counter_simple32 and > > > counter_simple64 > > >to clearly indicate size. > > > 2. Added warning for counter_simple* usage and it should be used only > > >when there is no need for atomicity. > > > 3. Renamed counter_atomic to counter_atomic32 to clearly indicate > > > size. > > > 4. Renamed counter_atomic_long to counter_atomic64 and it now uses > > >atomic64_t ops and indicates size. > > > 5. Test updated for the API renames. > > > 6. Added helper functions for test results printing > > > 7. Verified that the test module compiles in kunit env. and test > > >module can be loaded to run the test. > > > > Thanks for all of this! > > > > > 8. Updated Documentation to reflect the intent to make the API > > >restricted so it can never be used to guard object lifetimes > > >and state management. I left _return ops for now, inc_return > > >is necessary for now as per the discussion we had on this topic. > > > > I still *really* do not want dec_return() to exist. That is asking for > > trouble. I'd prefer inc_return() not exist either, but I can live with > > it. ;) > > > > Thanks. I am equally concerned about adding anything that can be used to > guard object lifetimes. So I will make sure this set won't expand and > plan to remove dec_return() if we don't find any usages. I would like it much stronger than "if". dec_return() needs to be just dec() and read(). It will not be less efficient (since they're both inlines), but it _will_ create a case where the atomicity cannot be used for ref counting. My point is that anything that _requires_ dec_return() (or, frankly, inc_return()) is _not_ "just" a statistical counter. It may not be a refcounter, but it relies on the inc/dec atomicity for some reason beyond counting in once place and reporting it in another. -- Kees Cook ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtl8188eu: Reapply "staging:r8188eu: Use lib80211 to encrypt (CCMP) tx frames"
Commit 515ce733e86e ("staging:r8188eu: Use lib80211 to encrypt (CCMP) tx frames") was reverted because it caused scheduling while atomic bugs and hard freezes. Experimentation showed that there were no freezes and no BUG messages logged when lib80211_get_crypto_ops() was called directly rather than indirectly through try_then_request_module(). Reapply "staging:r8188eu: Use lib80211 to encrypt (CCMP) tx frames" with resolved revert conflicts and replace try_then_request_module() with direct call to lib80211_get_crypto_ops(). Original commit message: Put data to skb, decrypt with lib80211_crypt_ccmp, and place back to tx buffer. Cc: Ivan Safonov Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_security.c | 778 ++ 1 file changed, 72 insertions(+), 706 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_security.c b/drivers/staging/rtl8188eu/core/rtw_security.c index d2d562550eb7..b3850efccaa0 100644 --- a/drivers/staging/rtl8188eu/core/rtw_security.c +++ b/drivers/staging/rtl8188eu/core/rtw_security.c @@ -722,552 +722,106 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, struct recv_frame *precvframe) return res; } -/* 3 = AES related = */ - -#define MAX_MSG_SIZE 2048 -/*/ -/ SBOX Table */ -/*/ - -static const u8 sbox_table[256] = { - 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, - 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, - 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, - 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, - 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, - 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, - 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, - 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, - 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, - 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, - 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, - 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, - 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, - 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, - 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, - 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, - 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, - 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, - 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, - 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb, - 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, - 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, - 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, - 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08, - 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, - 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a, - 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, - 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, - 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, - 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf, - 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, - 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16 -}; - -/*/ -/ Function Prototypes / -/*/ - -static void bitwise_xor(u8 *ina, u8 *inb, u8 *out); -static void construct_mic_iv(u8 *mic_header1, int qc_exists, int a4_exists, u8 *mpdu, uint payload_length, u8 *pn_vector); -static void construct_mic_header1(u8 *mic_header1, int header_length, u8 *mpdu); -static void construct_mic_header2(u8 *mic_header2, u8 *mpdu, int a4_exists, int qc_exists); -static void construct_ctr_preload(u8 *ctr_preload, int a4_exists, int qc_exists, u8 *mpdu, u8 *pn_vector, int c); -static void xor_128(u8 *a, u8 *b, u8 *out); -static void xor_32(u8 *a, u8 *b, u8 *out); -static u8 sbox(u8 a); -static void next_key(u8 *key, int round); -static void byte_sub(u8 *in, u8 *out); -static void shift_row(u8 *in, u8 *out); -static void mix_column(u8 *in, u8 *out); -static void aes128k128d(u8 *key, u8 *data, u8 *ciphertext); - -// -/* aes128k128d() */ -/* Performs a 128 bit AES encrypt with */ -/* 128 bit data. */ -// -static void xor_128(u8 *a, u8 *b, u8 *out) -{ - int i; - - for (i = 0; i < 16; i++) - out[i] = a[i] ^ b[i]; -} - -static void xor_32(u8 *a, u8 *b, u8 *out) -{ - int i; - - for (i = 0; i < 4; i++) - out[i] = a[i] ^ b[i]; -} - -static u8 sbox(u8 a) -{ - return sbox_table[(int)a]; -} - -static void next_key(u8 *key, int round) -{ - u8 rcon; - u8 sbox_key[4]; - static const u8 rcon_table[12] = { - 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, - 0x1b, 0x36, 0x36, 0x36 - }; - - sbox_key[0] = sbox(key[13]); - sbox_key[1] = sbox(k
[PATCH] staging: media: atomisp: clean up block comment style issues
From: Gary Yao Clean up block comment style issues to follow kernel coding style and clear checkpatch warnings. WARNING: Block comments use * on subsequent lines WARNING: Block comments use a trailing */ on a separate line Signed-off-by: Gary Yao --- .../pci/isp/modes/interface/isp_types.h | 41 +++ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/isp/modes/interface/isp_types.h b/drivers/staging/media/atomisp/pci/isp/modes/interface/isp_types.h index ae273c826808..d1c42c77fa50 100644 --- a/drivers/staging/media/atomisp/pci/isp/modes/interface/isp_types.h +++ b/drivers/staging/media/atomisp/pci/isp/modes/interface/isp_types.h @@ -1,26 +1,29 @@ /* SPDX-License-Identifier: GPL-2.0 */ -/** -Support for Intel Camera Imaging ISP subsystem. -Copyright (c) 2010 - 2015, Intel Corporation. - -This program is free software; you can redistribute it and/or modify it -under the terms and conditions of the GNU General Public License, -version 2, as published by the Free Software Foundation. - -This program is distributed in the hope it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -more details. -*/ +/* + * Support for Intel Camera Imaging ISP subsystem. + * Copyright (c) 2010 - 2015, Intel Corporation. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + */ #ifndef _ISP_TYPES_H_ #define _ISP_TYPES_H_ -/* Workaround: hivecc complains about "tag "sh_css_3a_output" already declared" - without this extra decl. */ +/* + * Workaround: hivecc complains about "tag "sh_css_3a_output" already declared" + * without this extra decl. + */ struct ia_css_3a_output; -/* Input stream formats, these correspond to the MIPI formats and the way +/* + * Input stream formats, these correspond to the MIPI formats and the way * the CSS receiver sends these to the input formatter. * The bit depth of each pixel element is stored in the global variable * isp_bits_per_pixel. @@ -37,8 +40,10 @@ enum sh_stream_format { }; struct s_isp_frames { - /* global variables that are written to by either the SP or the host, - every ISP binary needs these. */ + /* +* Global variables that are written to by either the SP or the host, +* every ISP binary needs these. +*/ /* output frame */ char *xmem_base_addr_y; char *xmem_base_addr_uv; -- 2.26.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] fix double next comment in drivers/staging/nvec/nvec.c
Signed-off-by: Ryan Kosta --- drivers/staging/nvec/nvec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c index 360ec040774..a80996b2f5c 100644 --- a/drivers/staging/nvec/nvec.c +++ b/drivers/staging/nvec/nvec.c @@ -289,7 +289,7 @@ EXPORT_SYMBOL(nvec_write_async); * interrupt handlers. * * Returns: 0 on success, a negative error code on failure. - * The response message is returned in @msg. Shall be freed with + * The response message is returned in @msg. Shall be freed * with nvec_msg_free() once no longer used. * */ -- 2.20.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel