Re: [PATCH v4] staging: atomisp: add a driver for ov5648 camera sensor
> Would it make sense to first get the other drivers to upstream and > then see what's the status of atomisp? Agreed > the board specific information from firmware is conveyed to the > sensor drivers will change to what the rest of the sensor drivers are > using. I think a most straightforward way would be to amend the ACPI > tables to include the necessary information. I don't see that happening. The firmware they have today is the firmware they will always have, and for any new devices we manage to get going is probably going to end up entirely hardcoded. > For this reason I'm tempted to postpone applying this patch at least > until the other drivers are available. Yes - unless someone has a different controller and that sensor on a board so can test it that way ? Alan ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v5 2/2] staging: ion: create one device entry per heap
On Mon, Oct 09, 2017 at 05:10:37PM -0700, Laura Abbott wrote: > On 10/09/2017 03:08 PM, Mark Brown wrote: > > On Mon, Oct 09, 2017 at 02:25:47PM -0700, Laura Abbott wrote: > >> Anyway, to move this forward I think we need to see a proof of concept > >> of using selinux to protect access to specific heaps. > > Aren't Unix permissions enough with separate files or am I > > misunderstanding what you're looking to see a proof of concept for? > The goal is to be able to restrict heap access to certain services > and selinux groups on Android so straight unix permissions aren't > sufficient. Oh, there's Android users for this? The users I was aware of were non-Android. Though even so I'd have thought that given that SELinux is a superset of Unix file permissions it ought to be sufficient to be able to use them. I'd been thinking people were suggesting SELinux as a replacement for file permissions, using the single file and the greater capabilities of SELinux. signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v4] staging: atomisp: add a driver for ov5648 camera sensor
Hi Alan, On Tue, Oct 10, 2017 at 10:08:40AM +0100, Alan Cox wrote: > > Would it make sense to first get the other drivers to upstream and > > then see what's the status of atomisp? > > Agreed > > > the board specific information from firmware is conveyed to the > > sensor drivers will change to what the rest of the sensor drivers are > > using. I think a most straightforward way would be to amend the ACPI > > tables to include the necessary information. > > I don't see that happening. The firmware they have today is the > firmware they will always have, and for any new devices we manage to > get going is probably going to end up entirely hardcoded. You'd need to pass the table use initrd to amend the existing tables. Another option would be to parse the information from ACPI / EFI variables or whatever to set things up in the atomisp driver, and rely on e.g. I²C matching in the V4L2 async framework. The board specific information needed by the sensor drivers need to be somehow conveyed to the drivers. Perhaps using pset / device_add_property()? This is not trivial and would require at least either V4L2 framework or sensor driver changes to support atomisp, which currently is a staging driver. -- Sakari Ailus sakari.ai...@linux.intel.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] Staging: bcm2048 fix bare use of 'unsigned' in radio-bcm2048.c
This is a patch to the radio-bcm2048.c file that fixes up a warning found by the checkpatch.pl tool. Signed-off-by: Branislav Radocaj --- [1]: https://marc.info/?l=linux-driver-devel&m=150331308401055&w=2 Changes in v2: Removed unused 'size' argument from property_read macro. In property_write macro, 'signal, size' is replaced by 'prop_type'. This change implies the update of DEFINE_SYSFS_PROPERTY macro and all places of its usage as well. --- drivers/staging/media/bcm2048/radio-bcm2048.c | 60 +-- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c index 58adaea44eb5..5d3b0e5a1283 100644 --- a/drivers/staging/media/bcm2048/radio-bcm2048.c +++ b/drivers/staging/media/bcm2048/radio-bcm2048.c @@ -1964,7 +1964,7 @@ static ssize_t bcm2048_##prop##_write(struct device *dev, \ return err < 0 ? err : count; \ } -#define property_read(prop, size, mask) \ +#define property_read(prop, mask) \ static ssize_t bcm2048_##prop##_read(struct device *dev, \ struct device_attribute *attr, \ char *buf) \ @@ -1999,9 +1999,9 @@ static ssize_t bcm2048_##prop##_read(struct device *dev, \ return sprintf(buf, mask "\n", value); \ } -#define DEFINE_SYSFS_PROPERTY(prop, signal, size, mask, check) \ -property_write(prop, signal size, mask, check) \ -property_read(prop, size, mask) +#define DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check)\ +property_write(prop, prop_type, mask, check) \ +property_read(prop, mask) \ #define property_str_read(prop, size) \ static ssize_t bcm2048_##prop##_read(struct device *dev, \ @@ -2027,39 +2027,39 @@ static ssize_t bcm2048_##prop##_read(struct device *dev,\ return count; \ } -DEFINE_SYSFS_PROPERTY(power_state, unsigned, int, "%u", 0) -DEFINE_SYSFS_PROPERTY(mute, unsigned, int, "%u", 0) -DEFINE_SYSFS_PROPERTY(audio_route, unsigned, int, "%u", 0) -DEFINE_SYSFS_PROPERTY(dac_output, unsigned, int, "%u", 0) - -DEFINE_SYSFS_PROPERTY(fm_hi_lo_injection, unsigned, int, "%u", 0) -DEFINE_SYSFS_PROPERTY(fm_frequency, unsigned, int, "%u", 0) -DEFINE_SYSFS_PROPERTY(fm_af_frequency, unsigned, int, "%u", 0) -DEFINE_SYSFS_PROPERTY(fm_deemphasis, unsigned, int, "%u", 0) -DEFINE_SYSFS_PROPERTY(fm_rds_mask, unsigned, int, "%u", 0) -DEFINE_SYSFS_PROPERTY(fm_best_tune_mode, unsigned, int, "%u", 0) -DEFINE_SYSFS_PROPERTY(fm_search_rssi_threshold, unsigned, int, "%u", 0) -DEFINE_SYSFS_PROPERTY(fm_search_mode_direction, unsigned, int, "%u", 0) -DEFINE_SYSFS_PROPERTY(fm_search_tune_mode, unsigned, int, "%u", value > 3) - -DEFINE_SYSFS_PROPERTY(rds, unsigned, int, "%u", 0) -DEFINE_SYSFS_PROPERTY(rds_b_block_mask, unsigned, int, "%u", 0) -DEFINE_SYSFS_PROPERTY(rds_b_block_match, unsigned, int, "%u", 0) -DEFINE_SYSFS_PROPERTY(rds_pi_mask, unsigned, int, "%u", 0) -DEFINE_SYSFS_PROPERTY(rds_pi_match, unsigned, int, "%u", 0) -DEFINE_SYSFS_PROPERTY(rds_wline, unsigned, int, "%u", 0) -property_read(rds_pi, unsigned int, "%x") +DEFINE_SYSFS_PROPERTY(power_state, unsigned int, "%u", 0) +DEFINE_SYSFS_PROPERTY(mute, unsigned int, "%u", 0) +DEFINE_SYSFS_PROPERTY(audio_route, unsigned int, "%u", 0) +DEFINE_SYSFS_PROPERTY(dac_output, unsigned int, "%u", 0) + +DEFINE_SYSFS_PROPERTY(fm_hi_lo_injection, unsigned int, "%u", 0) +DEFINE_SYSFS_PROPERTY(fm_frequency, unsigned int, "%u", 0) +DEFINE_SYSFS_PROPERTY(fm_af_frequency, unsigned int, "%u", 0) +DEFINE_SYSFS_PROPERTY(fm_deemphasis, unsigned int, "%u", 0) +DEFINE_SYSFS_PROPERTY(fm_rds_mask, unsigned int, "%u", 0) +DEFINE_SYSFS_PROPERTY(fm_best_tune_mode, unsigned int, "%u", 0) +DEFINE_SYSFS_PROPERTY(fm_search_rssi_threshold, unsigned int, "%u", 0) +DEFINE_SYSFS_PROPERTY(fm_search_mode_direction, unsigned int, "%u", 0) +DEFINE_SYSFS_PROPERTY(fm_search_tune_mode, unsigned int, "%u", value > 3) + +DEFINE_SYSFS_PROPERTY(rds, unsigned int, "%u", 0) +DEFINE_SYSFS_PROPERTY(rds_b_block_mask, unsigned int, "%u", 0) +DEFINE_SYSFS_PROPERTY(rds_b_block_match, unsigned int, "%u", 0) +DEFINE_SYSFS_PROPERTY(rds_pi_mask, unsigned int, "%u", 0) +DEFINE_SYSFS_PROPERTY(rds_pi_match, unsigned int, "%u", 0) +DEFINE_SYSFS_PROPERTY(rds_wline, unsigned int, "%u", 0) +property_read(rds_pi, "%x") property_str_read(rds_rt, (BCM2048_MAX_RDS_RT + 1)) property_str_read(rds_ps, (BCM2048_MAX_RDS_PS + 1)) -property_read(fm_rds_flags, unsigned int, "%u") +property_read(fm_rds_flags, "%u") property_str_read(rds_data, BCM2048_MAX_RDS_RADIO_TEXT * 5) -pro
[PATCH] staging: wilc1000: replace redundant computations with 0
From: Colin Ian King Shifting and masking strHostIfSetMulti->enabled is redundant since enabled is a bool and so all the shifted and masked values will be zero. Replace them with zero to simplify the code. Detected by CoverityScan, CID#1339458 ("Bad shift operation") and CID#1339506 ("Operands don't affect result"). Signed-off-by: Colin Ian King --- drivers/staging/wilc1000/host_interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 7b620658ec38..94477dd08c85 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -2417,9 +2417,9 @@ static void Handle_SetMulticastFilter(struct wilc_vif *vif, pu8CurrByte = wid.val; *pu8CurrByte++ = (strHostIfSetMulti->enabled & 0xFF); - *pu8CurrByte++ = ((strHostIfSetMulti->enabled >> 8) & 0xFF); - *pu8CurrByte++ = ((strHostIfSetMulti->enabled >> 16) & 0xFF); - *pu8CurrByte++ = ((strHostIfSetMulti->enabled >> 24) & 0xFF); + *pu8CurrByte++ = 0; + *pu8CurrByte++ = 0; + *pu8CurrByte++ = 0; *pu8CurrByte++ = (strHostIfSetMulti->cnt & 0xFF); *pu8CurrByte++ = ((strHostIfSetMulti->cnt >> 8) & 0xFF); -- 2.14.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtlwifi: mark expected switch fall-through in rtl_make_smps_action
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva --- drivers/staging/rtlwifi/base.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/rtlwifi/base.c b/drivers/staging/rtlwifi/base.c index b88b0e8..cc38907 100644 --- a/drivers/staging/rtlwifi/base.c +++ b/drivers/staging/rtlwifi/base.c @@ -2334,9 +2334,7 @@ static struct sk_buff *rtl_make_smps_action(struct ieee80211_hw *hw, case IEEE80211_SMPS_AUTOMATIC:/* 0 */ case IEEE80211_SMPS_NUM_MODES:/* 4 */ WARN_ON(1); - /* Here will get a 'MISSING_BREAK' in Coverity Test, just ignore it. -* According to Kernel Code, here is right. -*/ + /* fall through */ case IEEE80211_SMPS_OFF:/* 1 */ /*MIMO_PS_NOLIMIT*/ action_frame->u.action.u.ht_smps.smps_control = WLAN_HT_SMPS_CONTROL_DISABLED;/* 0 */ -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: typec: tcpci: mark expected switch fall-through in tcpci_to_typec_cc
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva --- drivers/staging/typec/tcpci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/typec/tcpci.c b/drivers/staging/typec/tcpci.c index 4636804..b6abaf7 100644 --- a/drivers/staging/typec/tcpci.c +++ b/drivers/staging/typec/tcpci.c @@ -139,6 +139,7 @@ static enum typec_cc_status tcpci_to_typec_cc(unsigned int cc, bool sink) case 0x3: if (sink) return TYPEC_CC_RP_3_0; + /* fall through */ case 0x0: default: return TYPEC_CC_OPEN; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: vt6655: mark expected switch fall-throughs in vnt_set_keymode
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva --- drivers/staging/vt6655/key.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vt6655/key.c b/drivers/staging/vt6655/key.c index d7ede73..d891993 100644 --- a/drivers/staging/vt6655/key.c +++ b/drivers/staging/vt6655/key.c @@ -56,17 +56,19 @@ static int vnt_set_keymode(struct ieee80211_hw *hw, u8 *mac_addr, } switch (key_type) { - /* fallthrough */ case VNT_KEY_DEFAULTKEY: /* default key last entry */ entry = MAX_KEY_TABLE - 1; key->hw_key_idx = entry; + /* fall through */ case VNT_KEY_ALLGROUP: key_mode |= VNT_KEY_ALLGROUP; if (onfly_latch) key_mode |= VNT_KEY_ONFLY_ALL; + /* fall through */ case VNT_KEY_GROUP_ADDRESS: key_mode |= mode; + /* fall through */ case VNT_KEY_GROUP: key_mode |= (mode << 4); key_mode |= VNT_KEY_GROUP; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2] Staging: bcm2048 fix bare use of 'unsigned' in radio-bcm2048.c
Hi Branislav, On Tue, Oct 10, 2017 at 03:29:19PM +0200, Branislav Radocaj wrote: > This is a patch to the radio-bcm2048.c file that fixes up > a warning found by the checkpatch.pl tool. > > Signed-off-by: Branislav Radocaj Nice work, a few git log nit picks for you to ensure your future kernel development success. You can read all this in Documentaton/process/submitting-patches.rst (section 2). - You can use imperative mood, i.e 'Fix foo by doing bar' instead of 'This patch ...' - We don't need to mention the file (either in the summary or in the body), people can see this from the diff. This is one way of writing the git log message for checkpatch fixes checkpatch emits WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable. Move EXPORT_SYMBOL macro call to immediately follow function definition. Good work, hope this helps. Tobin ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/1] vmbus: hvsock: add proper sync for vmbus_hvsock_device_unregister()
From: Dexuan Cui Without the patch, vmbus_hvsock_device_unregister() can destroy the device prematurely when close() is called, and can cause NULl dereferencing or potential data loss (the last portion of the data stream may be dropped prematurely). Please consider this for 4.14. Signed-off-by: Dexuan Cui Cc: Haiyang Zhang Cc: Stephen Hemminger Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel_mgmt.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index 018d2e0f8ec5..379b0df123be 100644 --- a/drivers/hv/channel_mgmt.c +++ b/drivers/hv/channel_mgmt.c @@ -937,7 +937,10 @@ void vmbus_hvsock_device_unregister(struct vmbus_channel *channel) { BUG_ON(!is_hvsock_channel(channel)); - channel->rescind = true; + /* We always get a rescind msg when a connection is closed. */ + while (!READ_ONCE(channel->probe_done) || !READ_ONCE(channel->rescind)) + msleep(1); + vmbus_device_unregister(channel->device_obj); } EXPORT_SYMBOL_GPL(vmbus_hvsock_device_unregister); -- 2.14.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel