Re: PROBLEM: 4.15.0-rc3 APIC causes lockups on Core 2 Duo laptop
I was just now trying to track down my other issue, whereby somewhere along the tree kexec stops working properly. In the process of doing that I realized I had initially made one change to the original 4.9 config beyond oldconfig: I'd turned off WX debugging. I've now compiled a bunch of versions with WX debugging back on, and new behavior arises. I am attaching the joournalctl log of a booted 4.13 kernel (from Linus' tree, commit 569dbb8). It boots and logs me in, but returns a call trace I wasn't seeing without the WX debugging. I am sending over in case it provides any information. The trace bears the 23:24:09 timestamp. On Sat, Dec 23, 2017 at 01:35:12AM +, Dexuan Cui wrote: > > From: Alexandru Chirvasitu [mailto:achirva...@gmail.com] > > Sent: Friday, December 22, 2017 14:29 > > > > The output of that precise command run just now on a freshly-compiled > > copy of that commit is attached. > > > > On Fri, Dec 22, 2017 at 09:31:28PM +, Dexuan Cui wrote: > > > > From: Alexandru Chirvasitu [mailto:achirva...@gmail.com] > > > > Sent: Friday, December 22, 2017 06:21 > > > > > > > > In the absence of logs, the best I can do at the moment is attach a > > > > picture of the screen I am presented with on the apic=debug boot > > > > attempt. > > > > Alex > > > > > > The panic happens in irq_matrix_assign_system+0x4e/0xd0 in your picture. > > > IMO we should find which line of code causes the panic. I suppose > > > "objdump -D kernel/irq/matrix.o" can help to do that. > > > > > > Thanks, > > > -- Dexuan > > The BUG_ON panic happens at line 147: >BUG_ON(!test_and_clear_bit(bit, cm->alloc_map)); > > I'm sure Thomas and Dou know it better than me. > > 137 void irq_matrix_assign_system(struct irq_matrix *m, unsigned int bit, > 138 bool replace) > 139 { > 140 struct cpumap *cm = this_cpu_ptr(m->maps); > 141 > 142 BUG_ON(bit > m->matrix_bits); > 143 BUG_ON(m->online_maps > 1 || (m->online_maps && !replace)); > 144 > 145 set_bit(bit, m->system_map); > 146 if (replace) { > 147 BUG_ON(!test_and_clear_bit(bit, cm->alloc_map)); > 148 cm->allocated--; > 149 m->total_allocated--; > 150 } > 151 if (bit >= m->alloc_start && bit < m->alloc_end) > 152 m->systembits_inalloc++; > 153 > 154 trace_irq_matrix_assign_system(bit, m); > 155 } > > -- Dexuan > -- Logs begin at Thu 2017-12-14 19:59:20 EST, end at Fri 2017-12-22 23:45:29 EST. -- Dec 22 23:24:09 D-69-91-141-110 kernel: random: get_random_bytes called from start_kernel+0x32/0x3a0 with crng_init=0 Dec 22 23:24:09 D-69-91-141-110 kernel: Linux version 4.13.0 (root@axiomatic) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.5)) #1 SMP Fri Dec 22 22:18:58 EST 2017 Dec 22 23:24:09 D-69-91-141-110 kernel: x86/fpu: x87 FPU will use FXSAVE Dec 22 23:24:09 D-69-91-141-110 kernel: e820: BIOS-provided physical RAM map: Dec 22 23:24:09 D-69-91-141-110 kernel: BIOS-e820: [mem 0x-0x0009fbff] usable Dec 22 23:24:09 D-69-91-141-110 kernel: BIOS-e820: [mem 0x0009fc00-0x0009] reserved Dec 22 23:24:09 D-69-91-141-110 kernel: BIOS-e820: [mem 0x000e-0x000f] reserved Dec 22 23:24:09 D-69-91-141-110 kernel: BIOS-e820: [mem 0x0010-0xb7f9] usable Dec 22 23:24:09 D-69-91-141-110 kernel: BIOS-e820: [mem 0xb7fa-0xb7fadfff] ACPI data Dec 22 23:24:09 D-69-91-141-110 kernel: BIOS-e820: [mem 0xb7fae000-0xb7fe] ACPI NVS Dec 22 23:24:09 D-69-91-141-110 kernel: BIOS-e820: [mem 0xb7ff-0xb7ff] reserved Dec 22 23:24:09 D-69-91-141-110 kernel: BIOS-e820: [mem 0xfee0-0xfee00fff] reserved Dec 22 23:24:09 D-69-91-141-110 kernel: BIOS-e820: [mem 0xffb8-0x] reserved Dec 22 23:24:09 D-69-91-141-110 kernel: NX (Execute Disable) protection: active Dec 22 23:24:09 D-69-91-141-110 kernel: random: fast init done Dec 22 23:24:09 D-69-91-141-110 kernel: SMBIOS 2.4 present. Dec 22 23:24:09 D-69-91-141-110 kernel: DMI: ASUSTeK Computer Inc. F5RL /F5RL , BIOS 210 06/12/2008 Dec 22 23:24:09 D-69-91-141-110 kernel: tsc: Fast TSC calibration using PIT Dec 22 23:24:09 D-69-91-141-110 kernel: e820: update [mem 0x-0x0fff] usable ==> reserved Dec 22 23:24:09 D-69-91-141-110 kernel: e820: remove [mem 0x000a-0x000f] usable Dec 22 23:24:09 D-69-91-141-110 kernel: e820: last_pfn = 0xb7fa0 max_arch_pfn = 0x100 Dec 22 23:24:09 D-69-91-141-110 kernel: MTRR default type: uncachable Dec 22 23:24:09 D-69-91-141-110 kernel: MTRR fixed ranges enabled: Dec 22 23:24:09 D-69-91-141-110 kernel: 0-9 write-back Dec 22 23:24:09 D-69-91-141-110 kernel: A-B uncachable Dec 22 23:24:09 D-69-91-141-110 kernel: C-C write-protect Dec 22 23:24:09 D-69-91-141-110
RE: PROBLEM: 4.15.0-rc3 APIC causes lockups on Core 2 Duo laptop
> From: Alexandru Chirvasitu [mailto:achirva...@gmail.com] > Sent: Friday, December 22, 2017 14:29 > > The output of that precise command run just now on a freshly-compiled > copy of that commit is attached. > > On Fri, Dec 22, 2017 at 09:31:28PM +, Dexuan Cui wrote: > > > From: Alexandru Chirvasitu [mailto:achirva...@gmail.com] > > > Sent: Friday, December 22, 2017 06:21 > > > > > > In the absence of logs, the best I can do at the moment is attach a > > > picture of the screen I am presented with on the apic=debug boot > > > attempt. > > > Alex > > > > The panic happens in irq_matrix_assign_system+0x4e/0xd0 in your picture. > > IMO we should find which line of code causes the panic. I suppose > > "objdump -D kernel/irq/matrix.o" can help to do that. > > > > Thanks, > > -- Dexuan The BUG_ON panic happens at line 147: BUG_ON(!test_and_clear_bit(bit, cm->alloc_map)); I'm sure Thomas and Dou know it better than me. 137 void irq_matrix_assign_system(struct irq_matrix *m, unsigned int bit, 138 bool replace) 139 { 140 struct cpumap *cm = this_cpu_ptr(m->maps); 141 142 BUG_ON(bit > m->matrix_bits); 143 BUG_ON(m->online_maps > 1 || (m->online_maps && !replace)); 144 145 set_bit(bit, m->system_map); 146 if (replace) { 147 BUG_ON(!test_and_clear_bit(bit, cm->alloc_map)); 148 cm->allocated--; 149 m->total_allocated--; 150 } 151 if (bit >= m->alloc_start && bit < m->alloc_end) 152 m->systembits_inalloc++; 153 154 trace_irq_matrix_assign_system(bit, m); 155 } -- Dexuan ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: PROBLEM: 4.15.0-rc3 APIC causes lockups on Core 2 Duo laptop
> From: Alexandru Chirvasitu [mailto:achirva...@gmail.com] > Sent: Friday, December 22, 2017 06:21 > > In the absence of logs, the best I can do at the moment is attach a > picture of the screen I am presented with on the apic=debug boot > attempt. > Alex The panic happens in irq_matrix_assign_system+0x4e/0xd0 in your picture. IMO we should find which line of code causes the panic. I suppose "objdump -D kernel/irq/matrix.o" can help to do that. Thanks, -- Dexuan ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: vt6656: fix unnecessary parantheses
This patch fixes a coding style issue as noted by checkpatch.pl related to unnecessary parentheses. This patch fixes the following checkpatch.pl warning: WARNING: Unnecessary parentheses around 'priv->basic_rates'. Signed-off-by: Sumit Pundir--- drivers/staging/vt6656/card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c index 501f482..811602e 100644 --- a/drivers/staging/vt6656/card.c +++ b/drivers/staging/vt6656/card.c @@ -443,7 +443,7 @@ int vnt_ofdm_min_rate(struct vnt_private *priv) int ii; for (ii = RATE_54M; ii >= RATE_6M; ii--) { - if ((priv->basic_rates) & ((u16)BIT(ii))) + if (priv->basic_rates & ((u16)BIT(ii))) return true; } -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/2] drivers: android: Fix logtags in methods
From: Harsh ShandilyaSeveral methods in the driver were hardcoding the function name in their logging calls which is a checkpatch violation. Utilise the __func__ macro to avoid needing to add the function name as is to the string. Test: logtags in dmesg remain unaffected before and after the patch. Signed-off-by: Harsh Shandilya Cc: Greg Kroah-Hartman Cc: "Arve Hjønnevåg" Cc: Todd Kjos Cc: Martijn Coenen Cc: de...@driverdev.osuosl.org Cc: linux-ker...@vger.kernel.org --- drivers/android/binder.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index ffb31dd9191a..1e48acfe27b7 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -4467,8 +4467,8 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) unsigned int size = _IOC_SIZE(cmd); void __user *ubuf = (void __user *)arg; - /*pr_info("binder_ioctl: %d:%d %x %lx\n", - proc->pid, current->pid, cmd, arg);*/ + // pr_info("%s: %d:%d %x %lx\n", + // __func__, proc->pid, current->pid, cmd, arg); binder_selftest_alloc(>alloc); @@ -4631,8 +4631,9 @@ static int binder_mmap(struct file *filp, struct vm_area_struct *vma) return 0; err_bad_arg: - pr_err("binder_mmap: %d %lx-%lx %s failed %d\n", - proc->pid, vma->vm_start, vma->vm_end, failure_string, ret); + pr_err("%s: %d %lx-%lx %s failed %d\n", + __func__, proc->pid, vma->vm_start, vma->vm_end, + failure_string, ret); return ret; } @@ -4641,8 +4642,8 @@ static int binder_open(struct inode *nodp, struct file *filp) struct binder_proc *proc; struct binder_device *binder_dev; - binder_debug(BINDER_DEBUG_OPEN_CLOSE, "binder_open: %d:%d\n", -current->group_leader->pid, current->pid); + binder_debug(BINDER_DEBUG_OPEN_CLOSE, "%s: %d:%d\n", + __func__, current->group_leader->pid, current->pid); proc = kzalloc(sizeof(*proc), GFP_KERNEL); if (proc == NULL) -- 2.15.0.631.g7ddcec0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/2] drivers: android: Use octal permissions
From: Harsh Shandilyacheckpatch warns against the use of symbolic permissions, this patch migrates all symbolic permissions in the binder driver to octal permissions. Test: debugfs nodes created by binder have the same unix permissions prior to and after this patch was applied. Signed-off-by: Harsh Shandilya Cc: Greg Kroah-Hartman Cc: "Arve Hjønnevåg" Cc: Todd Kjos Cc: Martijn Coenen Cc: de...@driverdev.osuosl.org Cc: linux-ker...@vger.kernel.org --- drivers/android/binder.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index bccec9de0533..ffb31dd9191a 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -141,7 +141,7 @@ enum { }; static uint32_t binder_debug_mask = BINDER_DEBUG_USER_ERROR | BINDER_DEBUG_FAILED_TRANSACTION | BINDER_DEBUG_DEAD_TRANSACTION; -module_param_named(debug_mask, binder_debug_mask, uint, S_IWUSR | S_IRUGO); +module_param_named(debug_mask, binder_debug_mask, uint, 0644); static char *binder_devices_param = CONFIG_ANDROID_BINDER_DEVICES; module_param_named(devices, binder_devices_param, charp, 0444); @@ -160,7 +160,7 @@ static int binder_set_stop_on_user_error(const char *val, return ret; } module_param_call(stop_on_user_error, binder_set_stop_on_user_error, - param_get_int, _stop_on_user_error, S_IWUSR | S_IRUGO); + param_get_int, _stop_on_user_error, 0644); #define binder_debug(mask, x...) \ do { \ @@ -4679,7 +4679,7 @@ static int binder_open(struct inode *nodp, struct file *filp) * anyway print all contexts that a given PID has, so this * is not a problem. */ - proc->debugfs_entry = debugfs_create_file(strbuf, S_IRUGO, + proc->debugfs_entry = debugfs_create_file(strbuf, 0444, binder_debugfs_dir_entry_proc, (void *)(unsigned long)proc->pid, _proc_fops); @@ -5518,27 +5518,27 @@ static int __init binder_init(void) if (binder_debugfs_dir_entry_root) { debugfs_create_file("state", - S_IRUGO, + 0444, binder_debugfs_dir_entry_root, NULL, _state_fops); debugfs_create_file("stats", - S_IRUGO, + 0444, binder_debugfs_dir_entry_root, NULL, _stats_fops); debugfs_create_file("transactions", - S_IRUGO, + 0444, binder_debugfs_dir_entry_root, NULL, _transactions_fops); debugfs_create_file("transaction_log", - S_IRUGO, + 0444, binder_debugfs_dir_entry_root, _transaction_log, _transaction_log_fops); debugfs_create_file("failed_transaction_log", - S_IRUGO, + 0444, binder_debugfs_dir_entry_root, _transaction_log_failed, _transaction_log_fops); -- 2.15.0.631.g7ddcec0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 7/8] staging: greybus: audio_codec.h: Prefer kernel type 'u32' over 'uint32_t'
Fix the following errors found by checkpatch.pl: CHECK: Prefer kernel type 'u32' over 'uint32_t' Cc: Vaibhav AgarwalSigned-off-by: Kamal Heib --- drivers/staging/greybus/audio_codec.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/greybus/audio_codec.h b/drivers/staging/greybus/audio_codec.h index 161b37c8ef17..fd7b8936cb95 100644 --- a/drivers/staging/greybus/audio_codec.h +++ b/drivers/staging/greybus/audio_codec.h @@ -53,7 +53,7 @@ enum gbaudio_codec_state { struct gbaudio_stream_params { int state; u8 sig_bits, channels; - uint32_t format, rate; + u32 format, rate; }; struct gbaudio_codec_dai { @@ -183,12 +183,12 @@ extern int gb_audio_gb_enable_widget(struct gb_connection *connection, extern int gb_audio_gb_disable_widget(struct gb_connection *connection, u8 widget_id); extern int gb_audio_gb_get_pcm(struct gb_connection *connection, - u16 data_cport, uint32_t *format, - uint32_t *rate, u8 *channels, + u16 data_cport, u32 *format, + u32 *rate, u8 *channels, u8 *sig_bits); extern int gb_audio_gb_set_pcm(struct gb_connection *connection, - u16 data_cport, uint32_t format, - uint32_t rate, u8 channels, + u16 data_cport, u32 format, + u32 rate, u8 channels, u8 sig_bits); extern int gb_audio_gb_set_tx_data_size(struct gb_connection *connection, u16 data_cport, u16 size); -- 2.14.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 8/8] staging: greybus: audio_codec.h Fix alignment should match open parenthesis
Fix "Alignment should match open parenthesis" checkpatch.pl errors. Cc: Vaibhav AgarwalSigned-off-by: Kamal Heib --- drivers/staging/greybus/audio_codec.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/greybus/audio_codec.h b/drivers/staging/greybus/audio_codec.h index fd7b8936cb95..a1d5440552d4 100644 --- a/drivers/staging/greybus/audio_codec.h +++ b/drivers/staging/greybus/audio_codec.h @@ -159,7 +159,7 @@ struct gbaudio_module_info { }; int gbaudio_tplg_parse_data(struct gbaudio_module_info *module, - struct gb_audio_topology *tplg_data); + struct gb_audio_topology *tplg_data); void gbaudio_tplg_release(struct gbaudio_module_info *module); int gbaudio_module_update(struct gbaudio_codec_info *codec, -- 2.14.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/8] staging: greybus: audio_codec.c: Cleanup blank lines
Remove the blank lines. Cc: Vaibhav AgarwalSigned-off-by: Kamal Heib --- drivers/staging/greybus/audio_codec.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c index 0dae31f39a2b..3f9088607ea7 100644 --- a/drivers/staging/greybus/audio_codec.c +++ b/drivers/staging/greybus/audio_codec.c @@ -587,7 +587,6 @@ static int gbcodec_mute_stream(struct snd_soc_dai *dai, int mute, int stream) struct gbaudio_codec_info *codec = dev_get_drvdata(dai->dev); struct gbaudio_stream_params *params; - dev_dbg(dai->dev, "Mute:%d, Direction:%s\n", mute, stream ? "CAPTURE":"PLAYBACK"); @@ -907,7 +906,6 @@ static void gbaudio_codec_clean_data_rx(struct gbaudio_data_connection *data) data->state[1] = GBAUDIO_CODEC_SHUTDOWN; } - static void gbaudio_codec_cleanup(struct gbaudio_module_info *module) { struct gbaudio_data_connection *data; @@ -923,7 +921,6 @@ static void gbaudio_codec_cleanup(struct gbaudio_module_info *module) if (cap_state > GBAUDIO_CODEC_SHUTDOWN) gbaudio_codec_clean_data_rx(data); - } } -- 2.14.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 6/8] staging: greybus: audio_codec.c: Prefer kernel type 'u32' over 'uint32_t'
Fix the following errors found by checkpatch.pl: CHECK: Prefer kernel type 'u32' over 'uint32_t' Cc: Vaibhav AgarwalSigned-off-by: Kamal Heib --- drivers/staging/greybus/audio_codec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c index 08b4dbdd8219..86f39e25b65c 100644 --- a/drivers/staging/greybus/audio_codec.c +++ b/drivers/staging/greybus/audio_codec.c @@ -47,7 +47,7 @@ static int gbaudio_module_enable_tx(struct gbaudio_codec_info *codec, int module_state, ret = 0; u16 data_cport, i2s_port, cportid; u8 sig_bits, channels; - uint32_t format, rate; + u32 format, rate; struct gbaudio_data_connection *data; struct gbaudio_stream_params *params; @@ -182,7 +182,7 @@ static int gbaudio_module_enable_rx(struct gbaudio_codec_info *codec, int module_state, ret = 0; u16 data_cport, i2s_port, cportid; u8 sig_bits, channels; - uint32_t format, rate; + u32 format, rate; struct gbaudio_data_connection *data; struct gbaudio_stream_params *params; @@ -412,7 +412,7 @@ static int gbcodec_hw_params(struct snd_pcm_substream *substream, { int ret; u8 sig_bits, channels; - uint32_t format, rate; + u32 format, rate; struct gbaudio_module_info *module; struct gbaudio_data_connection *data; struct gb_bundle *bundle; -- 2.14.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/8] staging: greybus: audio_codec.c: Space required around ':'
Space is required when using the question mark operator around ':' Cc: Vaibhav AgarwalSigned-off-by: Kamal Heib --- drivers/staging/greybus/audio_codec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c index 3f9088607ea7..2a62bca8c05c 100644 --- a/drivers/staging/greybus/audio_codec.c +++ b/drivers/staging/greybus/audio_codec.c @@ -319,7 +319,7 @@ int gbaudio_module_update(struct gbaudio_codec_info *codec, char intf_name[NAME_SIZE], dir[NAME_SIZE]; dev_dbg(module->dev, "%s:Module update %s sequence\n", w->name, - enable ? "Enable":"Disable"); + enable ? "Enable" : "Disable"); if ((w->id != snd_soc_dapm_aif_in) && (w->id != snd_soc_dapm_aif_out)) { dev_dbg(codec->dev, "No action required for %s\n", w->name); @@ -588,7 +588,7 @@ static int gbcodec_mute_stream(struct snd_soc_dai *dai, int mute, int stream) struct gbaudio_stream_params *params; dev_dbg(dai->dev, "Mute:%d, Direction:%s\n", mute, - stream ? "CAPTURE":"PLAYBACK"); + stream ? "CAPTURE" : "PLAYBACK"); mutex_lock(>lock); -- 2.14.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/8] staging: greybus: audio_codec.c: Fix alignment should match open parenthesis
Cleanup "Alignment should match open parenthesis" checkpatch.pl errors. Cc: Vaibhav AgarwalSigned-off-by: Kamal Heib --- drivers/staging/greybus/audio_codec.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c index fdb9e83cc34b..0dae31f39a2b 100644 --- a/drivers/staging/greybus/audio_codec.c +++ b/drivers/staging/greybus/audio_codec.c @@ -70,7 +70,7 @@ static int gbaudio_module_enable_tx(struct gbaudio_codec_info *codec, i2s_port = 0; /* fixed for now */ cportid = data->connection->hd_cport_id; ret = gb_audio_apbridgea_register_cport(data->connection, - i2s_port, cportid, + i2s_port, cportid, AUDIO_APBRIDGEA_DIRECTION_TX); if (ret) { dev_err_ratelimited(module->dev, @@ -160,7 +160,7 @@ static int gbaudio_module_disable_tx(struct gbaudio_module_info *module, int id) i2s_port = 0; /* fixed for now */ cportid = data->connection->hd_cport_id; ret = gb_audio_apbridgea_unregister_cport(data->connection, - i2s_port, cportid, + i2s_port, cportid, AUDIO_APBRIDGEA_DIRECTION_TX); if (ret) { dev_err_ratelimited(module->dev, @@ -205,7 +205,7 @@ static int gbaudio_module_enable_rx(struct gbaudio_codec_info *codec, i2s_port = 0; /* fixed for now */ cportid = data->connection->hd_cport_id; ret = gb_audio_apbridgea_register_cport(data->connection, - i2s_port, cportid, + i2s_port, cportid, AUDIO_APBRIDGEA_DIRECTION_RX); if (ret) { dev_err_ratelimited(module->dev, @@ -295,7 +295,7 @@ static int gbaudio_module_disable_rx(struct gbaudio_module_info *module, int id) i2s_port = 0; /* fixed for now */ cportid = data->connection->hd_cport_id; ret = gb_audio_apbridgea_unregister_cport(data->connection, - i2s_port, cportid, + i2s_port, cportid, AUDIO_APBRIDGEA_DIRECTION_RX); if (ret) { dev_err_ratelimited(module->dev, @@ -567,7 +567,7 @@ static int gbcodec_prepare(struct snd_pcm_substream *substream, if (ret) { mutex_unlock(>lock); dev_err_ratelimited(dai->dev, "set_data_size failed:%d\n", -ret); + ret); return ret; } @@ -827,7 +827,7 @@ int gbaudio_register_module(struct gbaudio_module_info *module) module->num_dapm_widgets); if (module->controls) snd_soc_add_codec_controls(codec, module->controls, -module->num_controls); + module->num_controls); if (module->dapm_routes) snd_soc_dapm_add_routes(>dapm, module->dapm_routes, module->num_dapm_routes); @@ -972,7 +972,7 @@ void gbaudio_unregister_module(struct gbaudio_module_info *module) dev_dbg(codec->dev, "Removing %d controls\n", module->num_controls); snd_soc_remove_codec_controls(codec, module->controls, - module->num_controls); + module->num_controls); } if (module->dapm_widgets) { dev_dbg(codec->dev, "Removing %d widgets\n", -- 2.14.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 5/8] staging: greybus: audio_codec.c: Logical continuations should be on the previous line
Fix the following error found by checkpatch.pl: CHECK: Logical continuations should be on the previous line Cc: Vaibhav AgarwalSigned-off-by: Kamal Heib --- drivers/staging/greybus/audio_codec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c index 2a62bca8c05c..08b4dbdd8219 100644 --- a/drivers/staging/greybus/audio_codec.c +++ b/drivers/staging/greybus/audio_codec.c @@ -841,8 +841,8 @@ int gbaudio_register_module(struct gbaudio_module_info *module) * from codec->jack_list */ list_for_each_entry(jack, >jack_list, list) { - if ((jack == >headset_jack) - || (jack == >button_jack)) + if ((jack == >headset_jack) || + (jack == >button_jack)) snd_device_register(codec->card->snd_card, jack->jack); } -- 2.14.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/8] staging: greybus: authentication.c: Fix alignment should match open parenthesis
Fix the following error found by checkpatch.pl: CHECK: Alignment should match open parenthesis +static int cap_ioctl(struct gb_cap *cap, unsigned int cmd, +void __user *buf) Cc: Viresh KumarSigned-off-by: Kamal Heib --- drivers/staging/greybus/authentication.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/greybus/authentication.c b/drivers/staging/greybus/authentication.c index 16cc65e1472b..a5d7c53df987 100644 --- a/drivers/staging/greybus/authentication.c +++ b/drivers/staging/greybus/authentication.c @@ -202,7 +202,7 @@ static int cap_release(struct inode *inode, struct file *file) } static int cap_ioctl(struct gb_cap *cap, unsigned int cmd, -void __user *buf) +void __user *buf) { struct cap_ioc_get_endpoint_uid endpoint_uid; struct cap_ioc_get_ims_certificate *ims_cert; -- 2.14.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/8] staging: greybus: Fix few issues reported by
This patch set include multiple fixes for the issues reported by checkpatch.pl Kamal Heib (8): staging: greybus: authentication.c: Fix alignment should match open parenthesis staging: greybus: audio_codec.c: Fix alignment should match open parenthesis staging: greybus: audio_codec.c: Cleanup blank lines staging: greybus: audio_codec.c: Space required around ':' staging: greybus: audio_codec.c: Logical continuations should be on the previous line staging: greybus: audio_codec.c: Prefer kernel type 'u32' over 'uint32_t' staging: greybus: audio_codec.h: Prefer kernel type 'u32' over 'uint32_t' staging: greybus: audio_codec.h Fix alignment should match open parenthesis drivers/staging/greybus/audio_codec.c| 31 ++- drivers/staging/greybus/audio_codec.h| 12 ++-- drivers/staging/greybus/authentication.c | 2 +- 3 files changed, 21 insertions(+), 24 deletions(-) -- 2.14.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Changed misspelled variable name
The misspelled variable name 'splitted' was changed into 'split'. Signed-off-by: Julian GeusSigned-off-by: Kilian Bender --- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c index 657ab95..782d8da 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c @@ -121,7 +121,7 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) struct ldlm_lock *new2 = NULL; enum ldlm_mode mode = req->l_req_mode; int added = (mode == LCK_NL); - int splitted = 0; + int split = 0; const struct ldlm_callback_suite null_cbs = { }; CDEBUG(D_DLMTRACE, @@ -249,7 +249,7 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) goto reprocess; } - splitted = 1; + split = 1; new2->l_granted_mode = lock->l_granted_mode; new2->l_policy_data.l_flock.pid = @@ -282,7 +282,7 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) } /* if new2 is created but never used, destroy it*/ - if (splitted == 0 && new2) + if (split == 0 && new2) ldlm_lock_destroy_nolock(new2); /* At this point we're granting the lock request. */ -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: PROBLEM: 4.15.0-rc3 APIC causes lockups on Core 2 Duo laptop
Hi Alexandru, At 12/21/2017 10:23 AM, Alexandru Chirvasitu wrote: This might be more helpful. I ran another bisect with the following final log: --- git bisect start # bad: [d6ffc6ac83b1f9f12652d89b9cb5bcbfbea7796c] x86/vector: Respect affinity mask in irq descriptor git bisect bad d6ffc6ac83b1f9f12652d89b9cb5bcbfbea7796c # good: [e4ae4c8ea7c65f61fde29c689d148c8c9e05305a] Merge branch 'irq/core' into x86/apic git bisect good e4ae4c8ea7c65f61fde29c689d148c8c9e05305a # good: [4ef76eb6de734dc03a7f3b8f80884362364e6049] x86/apic: Get rid of the legacy irq data storage git bisect good 4ef76eb6de734dc03a7f3b8f80884362364e6049 # good: [ba801640b10d87b1c4e26cbcbe414a001255404f] x86/vector: Compile SMP only code conditionally git bisect good ba801640b10d87b1c4e26cbcbe414a001255404f # good: [90ad9e2d91067983f3328e21b306323877e5f48a] x86/io_apic: Reevaluate vector configuration on activate() git bisect good 90ad9e2d91067983f3328e21b306323877e5f48a # bad: [4900be83602b6be07366d3e69f756c1959f4169a] x86/vector/msi: Switch to global reservation mode git bisect bad 4900be83602b6be07366d3e69f756c1959f4169a # bad: [2db1f959d9dc16035f2eb44ed5fdb2789b754d6a] x86/vector: Handle managed interrupts proper git bisect bad 2db1f959d9dc16035f2eb44ed5fdb2789b754d6a # first bad commit: [2db1f959d9dc16035f2eb44ed5fdb2789b754d6a] x86/vector: Handle managed interrupts proper It's helpful to me. I tried it in QEmu with (Intel(R) Core(TM)2 Duo CPU T7700 @ 2.40GHz) but, can't reproduced the bug. --- That first bad commit 2db1f95 identified at the end is interesting: it's the only one I've tried through all of this that actually gives me a kernel panic when unadorned with kernel options (so unlike all of the others it fails to even drop me at a tty login prompt). I tried a number of things to fiddle with it: it boots fine with either nolapic or noapic. The former results in seeing a single cpu with lscpu, but the latter (noapic) seems to give me as much functionality as I'd need. I'm not seeing the issue noted before, Because the "noapic" just disable the I/O APIC, but, the "nolapic" will disable both the Local APIC and I/O APIC whereby noapic for 4.15.0-rc3 was somehow disabling my ethernet card. I hope this second bisect went down better than the last one.. Could you add "apic=debug" in the kernel command line, then, give me the dmesg log? Thanks, dou. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: most: Fix identifiers to function parameters
From: Ravi Elurifixed "function definition argument should have an identifier name", with appropriate identifier names. Pointed out by checkpatch. Signed-off-by: Ravi Eluri Signed-off-by: Suniel Mahesh --- Note: - This is the first patch of the two patch series. - Patch was compile tested and built(ARCH=arm) on linux-next (latest). - No build/run-time issues reported. --- drivers/staging/most/dim2/dim2.c | 4 ++-- drivers/staging/most/usb/usb.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/most/dim2/dim2.c b/drivers/staging/most/dim2/dim2.c index 2bd40ab..21e3fb4 100644 --- a/drivers/staging/most/dim2/dim2.c +++ b/drivers/staging/most/dim2/dim2.c @@ -101,8 +101,8 @@ struct dim2_hdm { unsigned char link_state; int atx_idx; struct medialb_bus bus; - void (*on_netinfo)(struct most_interface *, - unsigned char, unsigned char *); + void (*on_netinfo)(struct most_interface *most_iface, + unsigned char link_state, unsigned char *addrs); }; #define iface_to_hdm(iface) container_of(iface, struct dim2_hdm, most_iface) diff --git a/drivers/staging/most/usb/usb.c b/drivers/staging/most/usb/usb.c index 8d23075..31f184c 100644 --- a/drivers/staging/most/usb/usb.c +++ b/drivers/staging/most/usb/usb.c @@ -117,8 +117,8 @@ struct most_dev { struct mutex io_mutex; struct timer_list link_stat_timer; struct work_struct poll_work_obj; - void (*on_netinfo)(struct most_interface *, unsigned char, - unsigned char *); + void (*on_netinfo)(struct most_interface *most_iface, + unsigned char link_state, unsigned char *addrs); }; #define to_mdev(d) container_of(d, struct most_dev, iface) -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4.14 065/159] x86/virt: Add enum for hypervisors to replace x86_hyper
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Juergen Grosscommit 03b2a320b19f1424e9ac9c21696be9c60b6d0d93 upstream. The x86_hyper pointer is only used for checking whether a virtual device is supporting the hypervisor the system is running on. Use an enum for that purpose instead and drop the x86_hyper pointer. Signed-off-by: Juergen Gross Acked-by: Thomas Gleixner Acked-by: Xavier Deguillard Cc: Linus Torvalds Cc: Peter Zijlstra Cc: akata...@vmware.com Cc: a...@arndb.de Cc: boris.ostrov...@oracle.com Cc: de...@linuxdriverproject.org Cc: dmitry.torok...@gmail.com Cc: gre...@linuxfoundation.org Cc: haiya...@microsoft.com Cc: k...@vger.kernel.org Cc: k...@microsoft.com Cc: linux-graphics-maintai...@vmware.com Cc: linux-in...@vger.kernel.org Cc: moltm...@vmware.com Cc: pbonz...@redhat.com Cc: pv-driv...@vmware.com Cc: rkrc...@redhat.com Cc: sthem...@microsoft.com Cc: virtualizat...@lists.linux-foundation.org Cc: xen-de...@lists.xenproject.org Link: http://lkml.kernel.org/r/20171109132739.23465-3-jgr...@suse.com Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman --- arch/x86/hyperv/hv_init.c |2 +- arch/x86/include/asm/hypervisor.h | 23 ++- arch/x86/kernel/cpu/hypervisor.c | 12 +--- arch/x86/kernel/cpu/mshyperv.c|4 ++-- arch/x86/kernel/cpu/vmware.c |4 ++-- arch/x86/kernel/kvm.c |4 ++-- arch/x86/xen/enlighten_hvm.c |4 ++-- arch/x86/xen/enlighten_pv.c |4 ++-- drivers/hv/vmbus_drv.c|2 +- drivers/input/mouse/vmmouse.c | 10 -- drivers/misc/vmw_balloon.c|2 +- 11 files changed, 40 insertions(+), 31 deletions(-) --- a/arch/x86/hyperv/hv_init.c +++ b/arch/x86/hyperv/hv_init.c @@ -113,7 +113,7 @@ void hyperv_init(void) u64 guest_id; union hv_x64_msr_hypercall_contents hypercall_msr; - if (x86_hyper != _hyper_ms_hyperv) + if (x86_hyper_type != X86_HYPER_MS_HYPERV) return; /* Allocate percpu VP index */ --- a/arch/x86/include/asm/hypervisor.h +++ b/arch/x86/include/asm/hypervisor.h @@ -29,6 +29,16 @@ /* * x86 hypervisor information */ + +enum x86_hypervisor_type { + X86_HYPER_NATIVE = 0, + X86_HYPER_VMWARE, + X86_HYPER_MS_HYPERV, + X86_HYPER_XEN_PV, + X86_HYPER_XEN_HVM, + X86_HYPER_KVM, +}; + struct hypervisor_x86 { /* Hypervisor name */ const char *name; @@ -36,6 +46,9 @@ struct hypervisor_x86 { /* Detection routine */ uint32_t(*detect)(void); + /* Hypervisor type */ + enum x86_hypervisor_type type; + /* init time callbacks */ struct x86_hyper_init init; @@ -43,15 +56,7 @@ struct hypervisor_x86 { struct x86_hyper_runtime runtime; }; -extern const struct hypervisor_x86 *x86_hyper; - -/* Recognized hypervisors */ -extern const struct hypervisor_x86 x86_hyper_vmware; -extern const struct hypervisor_x86 x86_hyper_ms_hyperv; -extern const struct hypervisor_x86 x86_hyper_xen_pv; -extern const struct hypervisor_x86 x86_hyper_xen_hvm; -extern const struct hypervisor_x86 x86_hyper_kvm; - +extern enum x86_hypervisor_type x86_hyper_type; extern void init_hypervisor_platform(void); #else static inline void init_hypervisor_platform(void) { } --- a/arch/x86/kernel/cpu/hypervisor.c +++ b/arch/x86/kernel/cpu/hypervisor.c @@ -26,6 +26,12 @@ #include #include +extern const struct hypervisor_x86 x86_hyper_vmware; +extern const struct hypervisor_x86 x86_hyper_ms_hyperv; +extern const struct hypervisor_x86 x86_hyper_xen_pv; +extern const struct hypervisor_x86 x86_hyper_xen_hvm; +extern const struct hypervisor_x86 x86_hyper_kvm; + static const __initconst struct hypervisor_x86 * const hypervisors[] = { #ifdef CONFIG_XEN_PV @@ -41,8 +47,8 @@ static const __initconst struct hypervis #endif }; -const struct hypervisor_x86 *x86_hyper; -EXPORT_SYMBOL(x86_hyper); +enum x86_hypervisor_type x86_hyper_type; +EXPORT_SYMBOL(x86_hyper_type); static inline const struct hypervisor_x86 * __init detect_hypervisor_vendor(void) @@ -87,6 +93,6 @@ void __init init_hypervisor_platform(voi copy_array(>init, _init.hyper, sizeof(h->init)); copy_array(>runtime, _platform.hyper, sizeof(h->runtime)); - x86_hyper = h; + x86_hyper_type = h->type; x86_init.hyper.init_platform(); } --- a/arch/x86/kernel/cpu/mshyperv.c +++ b/arch/x86/kernel/cpu/mshyperv.c @@ -254,9 +254,9 @@ static void __init ms_hyperv_init_platfo #endif } -const __refconst struct hypervisor_x86 x86_hyper_ms_hyperv = { +const __initconst struct hypervisor_x86 x86_hyper_ms_hyperv = { .name = "Microsoft Hyper-V", .detect
[PATCH 4.14 064/159] x86/virt, x86/platform: Merge struct x86_hyper into struct x86_platform and struct x86_init
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Juergen Grosscommit f72e38e8ec8869ac0ba5a75d7d2f897d98a1454e upstream. Instead of x86_hyper being either NULL on bare metal or a pointer to a struct hypervisor_x86 in case of the kernel running as a guest merge the struct into x86_platform and x86_init. This will remove the need for wrappers making it hard to find out what is being called. With dummy functions added for all callbacks testing for a NULL function pointer can be removed, too. Suggested-by: Ingo Molnar Signed-off-by: Juergen Gross Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: akata...@vmware.com Cc: boris.ostrov...@oracle.com Cc: de...@linuxdriverproject.org Cc: haiya...@microsoft.com Cc: k...@vger.kernel.org Cc: k...@microsoft.com Cc: pbonz...@redhat.com Cc: rkrc...@redhat.com Cc: ru...@rustcorp.com.au Cc: sthem...@microsoft.com Cc: virtualizat...@lists.linux-foundation.org Cc: xen-de...@lists.xenproject.org Link: http://lkml.kernel.org/r/20171109132739.23465-2-jgr...@suse.com Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman --- arch/x86/include/asm/hypervisor.h | 25 +++- arch/x86/include/asm/x86_init.h | 24 arch/x86/kernel/apic/apic.c |2 - arch/x86/kernel/cpu/hypervisor.c | 56 ++ arch/x86/kernel/cpu/mshyperv.c|2 - arch/x86/kernel/cpu/vmware.c |4 +- arch/x86/kernel/kvm.c |2 - arch/x86/kernel/x86_init.c|9 ++ arch/x86/mm/init.c|2 - arch/x86/xen/enlighten_hvm.c |8 ++--- arch/x86/xen/enlighten_pv.c |2 - include/linux/hypervisor.h|8 - 12 files changed, 82 insertions(+), 62 deletions(-) --- a/arch/x86/include/asm/hypervisor.h +++ b/arch/x86/include/asm/hypervisor.h @@ -23,6 +23,7 @@ #ifdef CONFIG_HYPERVISOR_GUEST #include +#include #include /* @@ -35,17 +36,11 @@ struct hypervisor_x86 { /* Detection routine */ uint32_t(*detect)(void); - /* Platform setup (run once per boot) */ - void(*init_platform)(void); + /* init time callbacks */ + struct x86_hyper_init init; - /* X2APIC detection (run once per boot) */ - bool(*x2apic_available)(void); - - /* pin current vcpu to specified physical cpu (run rarely) */ - void(*pin_vcpu)(int); - - /* called during init_mem_mapping() to setup early mappings. */ - void(*init_mem_mapping)(void); + /* runtime callbacks */ + struct x86_hyper_runtime runtime; }; extern const struct hypervisor_x86 *x86_hyper; @@ -58,17 +53,7 @@ extern const struct hypervisor_x86 x86_h extern const struct hypervisor_x86 x86_hyper_kvm; extern void init_hypervisor_platform(void); -extern bool hypervisor_x2apic_available(void); -extern void hypervisor_pin_vcpu(int cpu); - -static inline void hypervisor_init_mem_mapping(void) -{ - if (x86_hyper && x86_hyper->init_mem_mapping) - x86_hyper->init_mem_mapping(); -} #else static inline void init_hypervisor_platform(void) { } -static inline bool hypervisor_x2apic_available(void) { return false; } -static inline void hypervisor_init_mem_mapping(void) { } #endif /* CONFIG_HYPERVISOR_GUEST */ #endif /* _ASM_X86_HYPERVISOR_H */ --- a/arch/x86/include/asm/x86_init.h +++ b/arch/x86/include/asm/x86_init.h @@ -115,6 +115,18 @@ struct x86_init_pci { }; /** + * struct x86_hyper_init - x86 hypervisor init functions + * @init_platform: platform setup + * @x2apic_available: X2APIC detection + * @init_mem_mapping: setup early mappings during init_mem_mapping() + */ +struct x86_hyper_init { + void (*init_platform)(void); + bool (*x2apic_available)(void); + void (*init_mem_mapping)(void); +}; + +/** * struct x86_init_ops - functions for platform specific setup * */ @@ -127,6 +139,7 @@ struct x86_init_ops { struct x86_init_timers timers; struct x86_init_iommu iommu; struct x86_init_pci pci; + struct x86_hyper_init hyper; }; /** @@ -200,6 +213,15 @@ struct x86_legacy_features { }; /** + * struct x86_hyper_runtime - x86 hypervisor specific runtime callbacks + * + * @pin_vcpu: pin current vcpu to specified physical cpu (run rarely) + */ +struct x86_hyper_runtime { + void (*pin_vcpu)(int cpu); +}; + +/** * struct x86_platform_ops - platform specific runtime functions * @calibrate_cpu: calibrate CPU * @calibrate_tsc: calibrate TSC, if different from CPU @@ -218,6 +240,7 @@ struct x86_legacy_features { *
[PATCH] staging: pi433: fix CamelCase for maxMinus variables
Fixes checkpatch warnings: CHECK: Avoid CamelCase: CHECK: Avoid CamelCase: CHECK: Avoid CamelCase: CHECK: Avoid CamelCase: CHECK: Avoid CamelCase: Signed-off-by: Valentin Vidic--- drivers/staging/pi433/Documentation/pi433.txt | 10 +- drivers/staging/pi433/rf69.c | 14 +++--- drivers/staging/pi433/rf69_enum.h | 10 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/staging/pi433/Documentation/pi433.txt b/drivers/staging/pi433/Documentation/pi433.txt index c082878be0b1..7d9dc2244848 100644 --- a/drivers/staging/pi433/Documentation/pi433.txt +++ b/drivers/staging/pi433/Documentation/pi433.txt @@ -200,11 +200,11 @@ rf params: sets the gain of the low noise amp automatic - lna gain is determined by an agc max - lna gain is set to maximum - maxMinus6 - lna gain is set to 6db below max - maxMinus12 - lna gain is set to 12db below max - maxMinus24 - lna gain is set to 24db below max - maxMinus36 - lna gain is set to 36db below max - maxMinus48 - lna gain is set to 48db below max + max_minus_6 - lna gain is set to 6db below max + max_minus_12- lna gain is set to 12db below max + max_minus_24- lna gain is set to 24db below max + max_minus_36- lna gain is set to 36db below max + max_minus_48- lna gain is set to 48db below max bw_mantisse sets the bandwidth of the channel filter - part one: mantisse. mantisse16 - mantisse is set to 16 diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index 8bc09e10a582..d0bb94a22f2f 100644 --- a/drivers/staging/pi433/rf69.c +++ b/drivers/staging/pi433/rf69.c @@ -367,13 +367,13 @@ int rf69_set_antenna_impedance(struct spi_device *spi, enum antennaImpedance ant int rf69_set_lna_gain(struct spi_device *spi, enum lnaGain lnaGain) { switch (lnaGain) { - case automatic: return rf69_read_mod_write(spi, REG_LNA, MASK_LNA_GAIN, LNA_GAIN_AUTO); - case max:return rf69_read_mod_write(spi, REG_LNA, MASK_LNA_GAIN, LNA_GAIN_MAX); - case maxMinus6: return rf69_read_mod_write(spi, REG_LNA, MASK_LNA_GAIN, LNA_GAIN_MAX_MINUS_6); - case maxMinus12: return rf69_read_mod_write(spi, REG_LNA, MASK_LNA_GAIN, LNA_GAIN_MAX_MINUS_12); - case maxMinus24: return rf69_read_mod_write(spi, REG_LNA, MASK_LNA_GAIN, LNA_GAIN_MAX_MINUS_24); - case maxMinus36: return rf69_read_mod_write(spi, REG_LNA, MASK_LNA_GAIN, LNA_GAIN_MAX_MINUS_36); - case maxMinus48: return rf69_read_mod_write(spi, REG_LNA, MASK_LNA_GAIN, LNA_GAIN_MAX_MINUS_48); + case automatic:return rf69_read_mod_write(spi, REG_LNA, MASK_LNA_GAIN, LNA_GAIN_AUTO); + case max: return rf69_read_mod_write(spi, REG_LNA, MASK_LNA_GAIN, LNA_GAIN_MAX); + case max_minus_6: return rf69_read_mod_write(spi, REG_LNA, MASK_LNA_GAIN, LNA_GAIN_MAX_MINUS_6); + case max_minus_12: return rf69_read_mod_write(spi, REG_LNA, MASK_LNA_GAIN, LNA_GAIN_MAX_MINUS_12); + case max_minus_24: return rf69_read_mod_write(spi, REG_LNA, MASK_LNA_GAIN, LNA_GAIN_MAX_MINUS_24); + case max_minus_36: return rf69_read_mod_write(spi, REG_LNA, MASK_LNA_GAIN, LNA_GAIN_MAX_MINUS_36); + case max_minus_48: return rf69_read_mod_write(spi, REG_LNA, MASK_LNA_GAIN, LNA_GAIN_MAX_MINUS_48); default: dev_dbg(>dev, "set: illegal input param"); return -EINVAL; diff --git a/drivers/staging/pi433/rf69_enum.h b/drivers/staging/pi433/rf69_enum.h index 86f1d2f94ab2..77b97d173f87 100644 --- a/drivers/staging/pi433/rf69_enum.h +++ b/drivers/staging/pi433/rf69_enum.h @@ -68,11 +68,11 @@ enum antennaImpedance { enum lnaGain { automatic, max, - maxMinus6, - maxMinus12, - maxMinus24, - maxMinus36, - maxMinus48, + max_minus_6, + max_minus_12, + max_minus_24, + max_minus_36, + max_minus_48, undefined }; -- 2.15.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: most: Avoid trailing semicolon for macros
From: Ravi EluriFixes checkpatch warning: macros should not use a trailing semicolon. Signed-off-by: Ravi Eluri --- Note: - Patch was compile tested and built(ARCH=arm) on linux-next (latest). - No build issues reported. --- drivers/staging/most/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/most/core.c b/drivers/staging/most/core.c index 5ba2cd5..3dda8d8 100644 --- a/drivers/staging/most/core.c +++ b/drivers/staging/most/core.c @@ -36,7 +36,7 @@ struct list_head comp_list; } mc; -#define to_driver(d) container_of(d, struct mostcore, drv); +#define to_driver(d) container_of(d, struct mostcore, drv) struct pipe { struct core_component *comp; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel