Re: [PATCH] staging: media: lirc: lirc_zilog.c: fix quoted strings split across lines
On Tue, 2014-11-25 at 21:14 +, Luis de Bethencourt wrote: On Tue, Nov 25, 2014 at 01:00:07PM -0800, Joe Perches wrote: In the future, you might consider being more comprehensive with your patches. Wasn't sure about the scope of the style fixing patches. I've been reading Kernel Newbies and this looked like a good way to start contributing. Good to know more exhaustive changes are welcome. This code could be neatened a bit by: o using another set of logging macros o removing the unnecessary ftrace like logging o realigning arguments Great ideas. Should this have been all included in one patch, or each as part of a series with the previous one? Want to take the opportunity to learn about the process. Hello again Luis. I think the suggestion I posted here is suitable for a single change. Ideally, you'd make individual patches each with a single type of change. There is a script I posted a while back that groups various checkpatch types together and makes it a bit easier to do cleanup style patches. https://lkml.org/lkml/2014/7/11/794 But don't just use checkpatch as the sole decider of what's appropriate to fix or neaten. checkpatch is a stupid, brainless little script. So is the automation script that uses checkpatch. For instance, checkpatch would not have suggested creating and using another logging macro. Please use your own taste to best figure out what to fix and how. Using checkpatch to get familiar with kernel development is fine and all, but fixing actual defects and submitting new code is way more useful. cheers, welcome, Joe ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Drivers:staging:speakup: Fixed checkpatch warning
Fixed the checkpatch warning: WARNING: simple_strtoul is obsolete, use kstrtoul instead Signed-off-by: Athira Lekshmi C V andnlnb...@gmail.com --- drivers/staging/speakup/varhandlers.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/speakup/varhandlers.c b/drivers/staging/speakup/varhandlers.c index 1b0d1c0..00fd67e 100644 --- a/drivers/staging/speakup/varhandlers.c +++ b/drivers/staging/speakup/varhandlers.c @@ -324,7 +324,7 @@ char *spk_s2uchar(char *start, char *dest) { int val = 0; - val = simple_strtoul(skip_spaces(start), start, 10); + val = kstrtoul(skip_spaces(start), start, 10); if (*start == ',') start++; *dest = (u_char)val; -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Drivers:staging:speakup: Fixed checkpatch warning
On Wed, Nov 26, 2014 at 12:14 PM, Athira Lekshmi C V andnlnb...@gmail.com wrote: Fixed the checkpatch warning: WARNING: simple_strtoul is obsolete, use kstrtoul instead Signed-off-by: Athira Lekshmi C V andnlnb...@gmail.com --- drivers/staging/speakup/varhandlers.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/speakup/varhandlers.c b/drivers/staging/speakup/varhandlers.c index 1b0d1c0..00fd67e 100644 --- a/drivers/staging/speakup/varhandlers.c +++ b/drivers/staging/speakup/varhandlers.c @@ -324,7 +324,7 @@ char *spk_s2uchar(char *start, char *dest) { int val = 0; - val = simple_strtoul(skip_spaces(start), start, 10); + val = kstrtoul(skip_spaces(start), start, 10); if (*start == ',') start++; *dest = (u_char)val; NACK. Please test your patch or at least read the function signature kstrtoul(). -- Thanks, //richard ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Drivers:staging:comedi:drivers: Fixed checkpatch warning
Fixed the checkpatch warning: WARNING: please, no space before tabs Signed-off-by: Athira Lekshmi C V andnlnb...@gmail.com --- drivers/staging/comedi/drivers/ni_at_a2150.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/ni_at_a2150.c b/drivers/staging/comedi/drivers/ni_at_a2150.c index 69e543a..bff4852 100644 --- a/drivers/staging/comedi/drivers/ni_at_a2150.c +++ b/drivers/staging/comedi/drivers/ni_at_a2150.c @@ -108,7 +108,7 @@ TRIG_WAKE_EOS #define IRQ_LVL_BITS(x) (((x) 0xf) 4) /* sets irq level */ #define FIFO_INTR_EN_BIT 0x100 /* enable fifo interrupts */ #define FIFO_INTR_FHF_BIT0x200 /* interrupt fifo half full */ -#define DMA_INTR_EN_BIT 0x800 /* enable interrupt on dma terminal count */ +#define DMA_INTR_EN_BIT 0x800 /* enable interrupt on dma terminal count */ #define DMA_DEM_EN_BIT 0x1000 /* enables demand mode dma */ #define I8253_BASE_REG 0x14 #define I8253_MODE_REG 0x17 -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Drivers:staging:octeon: Fixed checkpatch warning
Fixed the checkpatch warning: WARNING: Missing a blank line after declarations Signed-off-by: Athira Lekshmi C V andnlnb...@gmail.com --- drivers/staging/octeon/ethernet-rx.c |5 + 1 file changed, 5 insertions(+) diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c index 44e372f..f80d509 100644 --- a/drivers/staging/octeon/ethernet-rx.c +++ b/drivers/staging/octeon/ethernet-rx.c @@ -84,6 +84,7 @@ static int cvm_irq_cpu; static void cvm_oct_enable_napi(void *_) { int cpu = smp_processor_id(); + napi_schedule(cvm_oct_napi[cpu].napi); } @@ -169,6 +170,7 @@ static inline int cvm_oct_check_rcv_error(cvmx_wqe_t *work) int interface = cvmx_helper_get_interface_num(work-ipprt); int index = cvmx_helper_get_interface_index_num(work-ipprt); union cvmx_gmxx_rxx_frm_ctl gmxx_rxx_frm_ctl; + gmxx_rxx_frm_ctl.u64 = cvmx_read_csr(CVMX_GMXX_RXX_FRM_CTL(index, interface)); if (gmxx_rxx_frm_ctl.s.pre_chk == 0) { @@ -272,6 +274,7 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) did_work_request = 0; if (work == NULL) { union cvmx_pow_wq_int wq_int; + wq_int.u64 = 0; wq_int.s.iq_dis = 1 pow_receive_group; wq_int.s.wq_int = 1 pow_receive_group; @@ -294,8 +297,10 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) * CPU. */ union cvmx_pow_wq_int_cntx counts; + int backlog; int cores_in_use = core_state.baseline_cores - atomic_read(core_state.available_cores); + counts.u64 = cvmx_read_csr(CVMX_POW_WQ_INT_CNTX(pow_receive_group)); backlog = counts.s.iq_cnt + counts.s.ds_cnt; if (backlog budget * cores_in_use napi != NULL) -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Drivers:staging:octeon: Fixed checkpatch warning
On Wed, Nov 26, 2014 at 05:17:48PM +0530, Athira Lekshmi C V wrote: @@ -294,8 +297,10 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) * CPU. */ union cvmx_pow_wq_int_cntx counts; + Don't put a blank here. int backlog; int cores_in_use = core_state.baseline_cores - atomic_read(core_state.available_cores); + counts.u64 = cvmx_read_csr(CVMX_POW_WQ_INT_CNTX(pow_receive_group)); backlog = counts.s.iq_cnt + counts.s.ds_cnt; regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Drivers:staging:octeon: Fixed checkpatch warning
Fixed the checkpatch warning: WARNING: Missing a blank line after declarations Signed-off-by: Athira Lekshmi C V andnlnb...@gmail.com --- drivers/staging/octeon/ethernet-rx.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c index 44e372f..a7ff01c 100644 --- a/drivers/staging/octeon/ethernet-rx.c +++ b/drivers/staging/octeon/ethernet-rx.c @@ -84,6 +84,7 @@ static int cvm_irq_cpu; static void cvm_oct_enable_napi(void *_) { int cpu = smp_processor_id(); + napi_schedule(cvm_oct_napi[cpu].napi); } @@ -296,6 +297,7 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) union cvmx_pow_wq_int_cntx counts; int backlog; int cores_in_use = core_state.baseline_cores - atomic_read(core_state.available_cores); + counts.u64 = cvmx_read_csr(CVMX_POW_WQ_INT_CNTX(pow_receive_group)); backlog = counts.s.iq_cnt + counts.s.ds_cnt; if (backlog budget * cores_in_use napi != NULL) -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: lustre: fix pointer declarations
On Tue, Nov 25, 2014 at 09:44:21PM +0100, Zahari Doychev wrote: This patch fixes pointer declarations from void * to void __user * in order to remove some sparse warnings. _Are_ those userland addresses, though? Quick grep shows that in the only caller of lnet_copy_iov2flat() we have something called ibmsg passed as the second argument *AND* *RIGHT* *BEFORE* *THAT* *CALL* *WE* *HAVE* ibmsg = tx-tx_msg; ibmsg-ibm_u.immediate.ibim_hdr = *hdr; Go ahead, explain how does that manage to work if ibmsg is a userland pointer. Either you have discovered an exploitable hole (direct store to userland address), or it's not a userland pointer, after all. Al, sick and tired of the remove some warnings as the sole rationale for patches, without even an attempt to figure out what those warnings are about. Magic box makes noises, magic box must be appeased... ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v13 0/12] dw-hdmi: convert imx hdmi to bridge/dw_hdmi
We found Freescale imx6 and Rockchip rk3288 and Ingenic JZ4780 (Xburst/MIPS) use the interface compatible Designware HDMI IP, but they also have some lightly differences, such as phy pll configuration, register width(imx hdmi register is one byte, but rk3288 is 4 bytes width and can only be accessed by word), 4K support(imx6 doesn't support 4k, but rk3288 does), and HDMI2.0 support. To reuse the imx-hdmi driver, we make this patch set: (1): fix some CodingStyle warning to make checkpatch happy (2): convert imx-hdmi to drm_bridge (3): split platform specific code (4): move imx-hdmi to bridge/dw_hdmi (5): extend dw_hdmi.c to support rk3288 hdmi (6): add rockchip rk3288 platform specific code dw_hdmi-rockchip.c Changes in v13: - patch against drm-next - split phy configuration from patch#4 Changes in v12: - refactor of_node_put(ddc_node) - squash patch convert dw_hdmi to drm_bridge - add comment for the depend on patch Changes in v11: - squash patch split some phy configuration to platform driver - split form patch dw_hdmi: add rk3288 support Changes in v10: - split generic dw_hdmi.c improvements from patch#11 (add rk3288 support) - add more display mode support mpll configuration for rk3288 Changes in v9: - move some phy configuration to platform driver Changes in v8: - correct some spelling mistake - modify ddc-i2c-bus and interrupt description - Add documentation for rockchip dw hdmi Changes in v7: - remove unused variables from structure dw_hdmi - remove a wrong modification - add copyrights for dw_hdmi-imx.c Changes in v6: - rearrange the patch order - refactor register access without reg_shift Changes in v5: - refactor reg-io-width Changes in v4: - fix checkpatch CHECK - defer probe ddc i2c adapter Changes in v3: - split multi-register access to one indepent patch Andy Yan (12): drm: imx: imx-hdmi: make checkpatch happy drm: imx: imx-hdmi: return defer if can't get ddc i2c adapter drm: imx: imx-hdmi: convert imx-hdmi to drm_bridge mode drm: imx: imx-hdmi: split phy configuration to platform driver drm: imx: imx-hdmi: move imx-hdmi to bridge/dw_hdmi dt-bindings: add document for dw_hdmi drm: bridge/dw_hdmi: add support for multi-byte register width access drm: bridge/dw_hdmi: add mode_valid support drm: bridge/dw_hdmi: clear i2cmphy_stat0 reg in hdmi_phy_wait_i2c_done drm: bridge/dw_hdmi: add function dw_hdmi_phy_enable_spare dt-bindings: Add documentation for rockchip dw hdmi drm: bridge/dw_hdmi: add rockchip rk3288 support .../devicetree/bindings/drm/bridge/dw_hdmi.txt | 40 ++ .../devicetree/bindings/video/dw_hdmi-rockchip.txt | 43 ++ drivers/gpu/drm/bridge/Kconfig | 5 + drivers/gpu/drm/bridge/Makefile| 1 + .../gpu/drm/{imx/imx-hdmi.c = bridge/dw_hdmi.c} | 757 + .../gpu/drm/{imx/imx-hdmi.h = bridge/dw_hdmi.h} | 4 +- drivers/gpu/drm/imx/Kconfig| 1 + drivers/gpu/drm/imx/Makefile | 2 +- drivers/gpu/drm/imx/dw_hdmi-imx.c | 273 drivers/gpu/drm/rockchip/Kconfig | 10 + drivers/gpu/drm/rockchip/Makefile | 2 +- drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c| 355 ++ include/drm/bridge/dw_hdmi.h | 60 ++ 13 files changed, 1132 insertions(+), 421 deletions(-) create mode 100644 Documentation/devicetree/bindings/drm/bridge/dw_hdmi.txt create mode 100644 Documentation/devicetree/bindings/video/dw_hdmi-rockchip.txt rename drivers/gpu/drm/{imx/imx-hdmi.c = bridge/dw_hdmi.c} (71%) rename drivers/gpu/drm/{imx/imx-hdmi.h = bridge/dw_hdmi.h} (99%) create mode 100644 drivers/gpu/drm/imx/dw_hdmi-imx.c create mode 100644 drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c create mode 100644 include/drm/bridge/dw_hdmi.h -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v13 01/12] drm: imx: imx-hdmi: make checkpatch happy
CHECK: Alignment should match open parenthesis + if ((hdmi-vic == 10) || (hdmi-vic == 11) || + (hdmi-vic == 12) || (hdmi-vic == 13) || CHECK: braces {} should be used on all arms of this statement + if (hdmi-hdmi_data.video_mode.mdvi) [...] + else { [...] Signed-off-by: Andy Yan andy@rock-chips.com Reviewed-by: Daniel Kurtz djku...@chromium.org --- Changes in v13: - patch against drm-next Changes in v12: None Changes in v11: None Changes in v10: None Changes in v9: None Changes in v8: None Changes in v7: None Changes in v6: - rearrange the patch order Changes in v5: None Changes in v4: - fix checkpatch CHECK Changes in v3: None drivers/gpu/drm/imx/imx-hdmi.c | 97 +- 1 file changed, 48 insertions(+), 49 deletions(-) diff --git a/drivers/gpu/drm/imx/imx-hdmi.c b/drivers/gpu/drm/imx/imx-hdmi.c index aaec6b2..79daec4 100644 --- a/drivers/gpu/drm/imx/imx-hdmi.c +++ b/drivers/gpu/drm/imx/imx-hdmi.c @@ -163,7 +163,7 @@ static void hdmi_modb(struct imx_hdmi *hdmi, u8 data, u8 mask, unsigned reg) } static void hdmi_mask_writeb(struct imx_hdmi *hdmi, u8 data, unsigned int reg, - u8 shift, u8 mask) +u8 shift, u8 mask) { hdmi_modb(hdmi, data shift, mask, reg); } @@ -327,7 +327,7 @@ static unsigned int hdmi_compute_cts(unsigned int freq, unsigned long pixel_clk, } static void hdmi_set_clk_regenerator(struct imx_hdmi *hdmi, - unsigned long pixel_clk) +unsigned long pixel_clk) { unsigned int clk_n, clk_cts; @@ -338,7 +338,7 @@ static void hdmi_set_clk_regenerator(struct imx_hdmi *hdmi, if (!clk_cts) { dev_dbg(hdmi-dev, %s: pixel clock not supported: %lu\n, -__func__, pixel_clk); + __func__, pixel_clk); return; } @@ -477,13 +477,11 @@ static void imx_hdmi_update_csc_coeffs(struct imx_hdmi *hdmi) u16 coeff_b = (*csc_coeff)[1][i]; u16 coeff_c = (*csc_coeff)[2][i]; - hdmi_writeb(hdmi, coeff_a 0xff, - HDMI_CSC_COEF_A1_LSB + i * 2); + hdmi_writeb(hdmi, coeff_a 0xff, HDMI_CSC_COEF_A1_LSB + i * 2); hdmi_writeb(hdmi, coeff_a 8, HDMI_CSC_COEF_A1_MSB + i * 2); hdmi_writeb(hdmi, coeff_b 0xff, HDMI_CSC_COEF_B1_LSB + i * 2); hdmi_writeb(hdmi, coeff_b 8, HDMI_CSC_COEF_B1_MSB + i * 2); - hdmi_writeb(hdmi, coeff_c 0xff, - HDMI_CSC_COEF_C1_LSB + i * 2); + hdmi_writeb(hdmi, coeff_c 0xff, HDMI_CSC_COEF_C1_LSB + i * 2); hdmi_writeb(hdmi, coeff_c 8, HDMI_CSC_COEF_C1_MSB + i * 2); } @@ -535,21 +533,22 @@ static void hdmi_video_packetize(struct imx_hdmi *hdmi) struct hdmi_data_info *hdmi_data = hdmi-hdmi_data; u8 val, vp_conf; - if (hdmi_data-enc_out_format == RGB - || hdmi_data-enc_out_format == YCBCR444) { - if (!hdmi_data-enc_color_depth) + if (hdmi_data-enc_out_format == RGB || + hdmi_data-enc_out_format == YCBCR444) { + if (!hdmi_data-enc_color_depth) { output_select = HDMI_VP_CONF_OUTPUT_SELECTOR_BYPASS; - else if (hdmi_data-enc_color_depth == 8) { + } else if (hdmi_data-enc_color_depth == 8) { color_depth = 4; output_select = HDMI_VP_CONF_OUTPUT_SELECTOR_BYPASS; - } else if (hdmi_data-enc_color_depth == 10) + } else if (hdmi_data-enc_color_depth == 10) { color_depth = 5; - else if (hdmi_data-enc_color_depth == 12) + } else if (hdmi_data-enc_color_depth == 12) { color_depth = 6; - else if (hdmi_data-enc_color_depth == 16) + } else if (hdmi_data-enc_color_depth == 16) { color_depth = 7; - else + } else { return; + } } else if (hdmi_data-enc_out_format == YCBCR422_8BITS) { if (!hdmi_data-enc_color_depth || hdmi_data-enc_color_depth == 8) @@ -561,8 +560,9 @@ static void hdmi_video_packetize(struct imx_hdmi *hdmi) else return; output_select = HDMI_VP_CONF_OUTPUT_SELECTOR_YCC422; - } else + } else { return; + } /* set the packetizer registers */ val = ((color_depth HDMI_VP_PR_CD_COLOR_DEPTH_OFFSET) @@ -623,34 +623,34 @@ static void hdmi_video_packetize(struct imx_hdmi *hdmi) } static inline void hdmi_phy_test_clear(struct imx_hdmi *hdmi, - unsigned char bit) + unsigned char bit) {
[PATCH v13 05/12] drm: imx: imx-hdmi: move imx-hdmi to bridge/dw_hdmi
the original imx hdmi driver is under drm/imx/, which depends on imx-drm, so move the imx hdmi driver out to drm/bridge and rename it to dw_hdmi Signed-off-by: Andy Yan andy@rock-chips.com --- Changes in v13: None Changes in v12: None Changes in v11: None Changes in v10: None Changes in v9: None Changes in v8: None Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None drivers/gpu/drm/bridge/Kconfig | 5 + drivers/gpu/drm/bridge/Makefile| 1 + .../gpu/drm/{imx/imx-hdmi.c = bridge/dw_hdmi.c} | 270 ++--- .../gpu/drm/{imx/imx-hdmi.h = bridge/dw_hdmi.h} | 42 drivers/gpu/drm/imx/Kconfig| 1 + drivers/gpu/drm/imx/Makefile | 2 +- .../drm/imx/{imx-hdmi_pltfm.c = dw_hdmi-imx.c}| 118 + include/drm/bridge/dw_hdmi.h | 57 + 8 files changed, 258 insertions(+), 238 deletions(-) rename drivers/gpu/drm/{imx/imx-hdmi.c = bridge/dw_hdmi.c} (84%) rename drivers/gpu/drm/{imx/imx-hdmi.h = bridge/dw_hdmi.h} (98%) rename drivers/gpu/drm/imx/{imx-hdmi_pltfm.c = dw_hdmi-imx.c} (60%) create mode 100644 include/drm/bridge/dw_hdmi.h diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 884923f..26162ef 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -3,3 +3,8 @@ config DRM_PTN3460 depends on DRM select DRM_KMS_HELPER ---help--- + +config DRM_DW_HDMI + bool Synopsys DesignWare High-Definition Multimedia Interface + depends on DRM + select DRM_KMS_HELPER diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile index b4733e1..d8a8cfd 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -1,3 +1,4 @@ ccflags-y := -Iinclude/drm obj-$(CONFIG_DRM_PTN3460) += ptn3460.o +obj-$(CONFIG_DRM_DW_HDMI) += dw_hdmi.o diff --git a/drivers/gpu/drm/imx/imx-hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c similarity index 84% rename from drivers/gpu/drm/imx/imx-hdmi.c rename to drivers/gpu/drm/bridge/dw_hdmi.c index 9503728..a53bf63 100644 --- a/drivers/gpu/drm/imx/imx-hdmi.c +++ b/drivers/gpu/drm/bridge/dw_hdmi.c @@ -6,12 +6,11 @@ * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * - * SH-Mobile High-Definition Multimedia Interface (HDMI) driver - * for SLISHDMI13T and SLIPHDMIT IP cores + * Designware High-Definition Multimedia Interface (HDMI) driver * * Copyright (C) 2010, Guennadi Liakhovetski g.liakhovet...@gmx.de */ - +#include linux/module.h #include linux/irq.h #include linux/delay.h #include linux/err.h @@ -23,9 +22,9 @@ #include drm/drm_crtc_helper.h #include drm/drm_edid.h #include drm/drm_encoder_slave.h +#include drm/bridge/dw_hdmi.h -#include imx-hdmi.h -#include imx-drm.h +#include dw_hdmi.h #define HDMI_EDID_LEN 512 @@ -101,16 +100,17 @@ struct hdmi_data_info { struct hdmi_vmode video_mode; }; -struct imx_hdmi { +struct dw_hdmi { struct drm_connector connector; struct drm_encoder *encoder; struct drm_bridge *bridge; - enum imx_hdmi_devtype dev_type; + enum dw_hdmi_devtype dev_type; struct device *dev; struct hdmi_data_info hdmi_data; - const struct imx_hdmi_plat_data *plat_data; + const struct dw_hdmi_plat_data *plat_data; + int vic; u8 edid[HDMI_EDID_LEN]; @@ -127,17 +127,17 @@ struct imx_hdmi { int ratio; }; -static inline void hdmi_writeb(struct imx_hdmi *hdmi, u8 val, int offset) +static inline void hdmi_writeb(struct dw_hdmi *hdmi, u8 val, int offset) { writeb(val, hdmi-regs + offset); } -static inline u8 hdmi_readb(struct imx_hdmi *hdmi, int offset) +static inline u8 hdmi_readb(struct dw_hdmi *hdmi, int offset) { return readb(hdmi-regs + offset); } -static void hdmi_modb(struct imx_hdmi *hdmi, u8 data, u8 mask, unsigned reg) +static void hdmi_modb(struct dw_hdmi *hdmi, u8 data, u8 mask, unsigned reg) { u8 val = hdmi_readb(hdmi, reg) ~mask; @@ -145,13 +145,13 @@ static void hdmi_modb(struct imx_hdmi *hdmi, u8 data, u8 mask, unsigned reg) hdmi_writeb(hdmi, val, reg); } -static void hdmi_mask_writeb(struct imx_hdmi *hdmi, u8 data, unsigned int reg, +static void hdmi_mask_writeb(struct dw_hdmi *hdmi, u8 data, unsigned int reg, u8 shift, u8 mask) { hdmi_modb(hdmi, data shift, mask, reg); } -static void hdmi_set_clock_regenerator_n(struct imx_hdmi *hdmi, +static void hdmi_set_clock_regenerator_n(struct dw_hdmi *hdmi, unsigned int value) { hdmi_writeb(hdmi, value 0xff, HDMI_AUD_N1); @@ -162,7 +162,7 @@ static void hdmi_set_clock_regenerator_n(struct imx_hdmi *hdmi, hdmi_modb(hdmi, 0, HDMI_AUD_CTS3_N_SHIFT_MASK,
[PATCH v13 06/12] dt-bindings: add document for dw_hdmi
Signed-off-by: Andy Yan andy@rock-chips.com --- Changes in v13: None Changes in v12: None Changes in v11: None Changes in v10: None Changes in v9: None Changes in v8: - correct some spelling mistake - modify ddc-i2c-bus and interrupt description Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None .../devicetree/bindings/drm/bridge/dw_hdmi.txt | 40 ++ 1 file changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/drm/bridge/dw_hdmi.txt diff --git a/Documentation/devicetree/bindings/drm/bridge/dw_hdmi.txt b/Documentation/devicetree/bindings/drm/bridge/dw_hdmi.txt new file mode 100644 index 000..107c1ca --- /dev/null +++ b/Documentation/devicetree/bindings/drm/bridge/dw_hdmi.txt @@ -0,0 +1,40 @@ +DesignWare HDMI bridge bindings + +Required properities: +- compatible: platform specific such as: + * fsl,imx6q-hdmi + * fsl,imx6dl-hdmi + * rockchip,rk3288-dw-hdmi +- reg: Physical base address and length of the controller's registers. +- ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing +- interrupts: The HDMI interrupt number + +Optional properties +- reg-io-width: the width of the reg:1,4, default set to 1 if not present + +Example: + hdmi: hdmi@012 { + compatible = fsl,imx6q-hdmi; + reg = 0x0012 0x9000; + interrupts = 0 115 0x04; + gpr = gpr; + clocks = clks 123, clks 124; + clock-names = iahb, isfr; + ddc-i2c-bus = i2c2; + + port@0 { + reg = 0; + + hdmi_mux_0: endpoint { + remote-endpoint = ipu1_di0_hdmi; + }; + }; + + port@1 { + reg = 1; + + hdmi_mux_1: endpoint { + remote-endpoint = ipu1_di1_hdmi; + }; + }; + }; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v13 07/12] drm: bridge/dw_hdmi: add support for multi-byte register width access
On rockchip rk3288, only word(32-bit) accesses are permitted for hdmi registers. Byte width accesses (writeb, readb) generate an imprecise external abort. Signed-off-by: Andy Yan andy@rock-chips.com --- Changes in v13: None Changes in v12: None Changes in v11: None Changes in v10: None Changes in v9: None Changes in v8: None Changes in v7: None Changes in v6: - refactor register access without reg_shift Changes in v5: - refactor reg-io-width Changes in v4: None Changes in v3: - split multi-register access to one indepent patch drivers/gpu/drm/bridge/dw_hdmi.c | 57 +++- 1 file changed, 51 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c index a53bf63..5e88c8d 100644 --- a/drivers/gpu/drm/bridge/dw_hdmi.c +++ b/drivers/gpu/drm/bridge/dw_hdmi.c @@ -100,6 +100,11 @@ struct hdmi_data_info { struct hdmi_vmode video_mode; }; +union dw_reg_ptr { + u32 __iomem *p32; + u8 __iomem *p8; +}; + struct dw_hdmi { struct drm_connector connector; struct drm_encoder *encoder; @@ -121,20 +126,43 @@ struct dw_hdmi { struct regmap *regmap; struct i2c_adapter *ddc; - void __iomem *regs; + union dw_reg_ptr regs; unsigned int sample_rate; int ratio; + + void (*write)(struct dw_hdmi *hdmi, u8 val, int offset); + u8 (*read)(struct dw_hdmi *hdmi, int offset); }; +static void dw_hdmi_writel(struct dw_hdmi *hdmi, u8 val, int offset) +{ + writel(val, hdmi-regs.p32 + offset); +} + +static u8 dw_hdmi_readl(struct dw_hdmi *hdmi, int offset) +{ + return readl(hdmi-regs.p32 + offset); +} + +static void dw_hdmi_writeb(struct dw_hdmi *hdmi, u8 val, int offset) +{ + writeb(val, hdmi-regs.p8 + offset); +} + +static u8 dw_hdmi_readb(struct dw_hdmi *hdmi, int offset) +{ + return readb(hdmi-regs.p8 + offset); +} + static inline void hdmi_writeb(struct dw_hdmi *hdmi, u8 val, int offset) { - writeb(val, hdmi-regs + offset); + hdmi-write(hdmi, val, offset); } static inline u8 hdmi_readb(struct dw_hdmi *hdmi, int offset) { - return readb(hdmi-regs + offset); + return hdmi-read(hdmi, offset); } static void hdmi_modb(struct dw_hdmi *hdmi, u8 data, u8 mask, unsigned reg) @@ -1508,6 +1536,7 @@ int dw_hdmi_bind(struct device *dev, struct device *master, struct dw_hdmi *hdmi; struct resource *iores; int ret, irq; + u32 val = 1; hdmi = devm_kzalloc(pdev-dev, sizeof(*hdmi), GFP_KERNEL); if (!hdmi) @@ -1520,6 +1549,22 @@ int dw_hdmi_bind(struct device *dev, struct device *master, hdmi-ratio = 100; hdmi-encoder = encoder; + of_property_read_u32(np, reg-io-width, val); + + switch (val) { + case 4: + hdmi-write = dw_hdmi_writel; + hdmi-read = dw_hdmi_readl; + break; + case 1: + hdmi-write = dw_hdmi_writeb; + hdmi-read = dw_hdmi_readb; + break; + default: + dev_err(dev, reg-io-width must be 1 or 4\n); + return -EINVAL; + } + ddc_node = of_parse_phandle(np, ddc-i2c-bus, 0); if (ddc_node) { hdmi-ddc = of_find_i2c_adapter_by_node(ddc_node); @@ -1544,9 +1589,9 @@ int dw_hdmi_bind(struct device *dev, struct device *master, return ret; iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); - hdmi-regs = devm_ioremap_resource(dev, iores); - if (IS_ERR(hdmi-regs)) - return PTR_ERR(hdmi-regs); + hdmi-regs.p32 = devm_ioremap_resource(dev, iores); + if (IS_ERR(hdmi-regs.p32)) + return PTR_ERR(hdmi-regs.p32); /* Product and revision IDs */ dev_info(dev, -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v13 08/12] drm: bridge/dw_hdmi: add mode_valid support
some platform may not support all the display mode, add mode_valid interface check it also add drm_connector_register which add a debugfs interface for dump display modes and edid information Signed-off-by: Andy Yan andy@rock-chips.com --- Changes in v13: None Changes in v12: None Changes in v11: None Changes in v10: None Changes in v9: None Changes in v8: None Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None drivers/gpu/drm/bridge/dw_hdmi.c | 17 + include/drm/bridge/dw_hdmi.h | 2 ++ 2 files changed, 19 insertions(+) diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c index 5e88c8d..b13e782 100644 --- a/drivers/gpu/drm/bridge/dw_hdmi.c +++ b/drivers/gpu/drm/bridge/dw_hdmi.c @@ -1406,6 +1406,20 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector) return 0; } +static enum drm_mode_status +dw_hdmi_connector_mode_valid(struct drm_connector *connector, +struct drm_display_mode *mode) +{ + struct dw_hdmi *hdmi = container_of(connector, + struct dw_hdmi, connector); + enum drm_mode_status mode_status = MODE_OK; + + if (hdmi-plat_data-mode_valid) + mode_status = hdmi-plat_data-mode_valid(connector, mode); + + return mode_status; +} + static struct drm_encoder *dw_hdmi_connector_best_encoder(struct drm_connector *connector) { @@ -1430,6 +1444,7 @@ static struct drm_connector_funcs dw_hdmi_connector_funcs = { static struct drm_connector_helper_funcs dw_hdmi_connector_helper_funcs = { .get_modes = dw_hdmi_connector_get_modes, + .mode_valid = dw_hdmi_connector_mode_valid, .best_encoder = dw_hdmi_connector_best_encoder, }; @@ -1631,6 +1646,8 @@ int dw_hdmi_bind(struct device *dev, struct device *master, dev_set_drvdata(dev, hdmi); + drm_connector_register(hdmi-connector); + return 0; } EXPORT_SYMBOL_GPL(dw_hdmi_bind); diff --git a/include/drm/bridge/dw_hdmi.h b/include/drm/bridge/dw_hdmi.h index 1bbf3ca..1777ab4 100644 --- a/include/drm/bridge/dw_hdmi.h +++ b/include/drm/bridge/dw_hdmi.h @@ -48,6 +48,8 @@ struct dw_hdmi_plat_data { const struct mpll_config *mpll_cfg; const struct curr_ctrl *cur_ctr; const struct sym_term *sym_term; + enum drm_mode_status (*mode_valid)(struct drm_connector *connector, + struct drm_display_mode *mode); }; void dw_hdmi_unbind(struct device *dev, struct device *master, void *data); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v13 09/12] drm: bridge/dw_hdmi: clear i2cmphy_stat0 reg in hdmi_phy_wait_i2c_done
HDMI_IH_I2CMPHY_STAT0 is a clear on write register, which indicates i2cm operation status(i2c transfer done or error), every hdmi phy register configuration must check this register to make sure the configuration has complete. But the indication bit should be cleared after check, otherwise the corresponding bit will hold on forever, this may give a wrong signal for next check. Signed-off-by: Andy Yan andy@rock-chips.com --- Changes in v13: None Changes in v12: None Changes in v11: - split form patch dw_hdmi: add rk3288 support Changes in v10: None Changes in v9: None Changes in v8: None Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None drivers/gpu/drm/bridge/dw_hdmi.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c index b13e782..8aa5f61 100644 --- a/drivers/gpu/drm/bridge/dw_hdmi.c +++ b/drivers/gpu/drm/bridge/dw_hdmi.c @@ -668,11 +668,15 @@ static inline void hdmi_phy_test_dout(struct dw_hdmi *hdmi, static bool hdmi_phy_wait_i2c_done(struct dw_hdmi *hdmi, int msec) { - while ((hdmi_readb(hdmi, HDMI_IH_I2CMPHY_STAT0) 0x3) == 0) { + u32 val; + + while ((val = hdmi_readb(hdmi, HDMI_IH_I2CMPHY_STAT0) 0x3) == 0) { if (msec-- == 0) return false; udelay(1000); } + hdmi_writeb(hdmi, val, HDMI_IH_I2CMPHY_STAT0); + return true; } -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v13 10/12] drm: bridge/dw_hdmi: add function dw_hdmi_phy_enable_spare
RK3288 HDMI will not work without the spare bit of HDMI_PHY_CONF0 enable Signed-off-by: Andy Yan andy@rock-chips.com --- Changes in v13: None Changes in v12: None Changes in v11: None Changes in v10: None Changes in v9: None Changes in v8: None Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None drivers/gpu/drm/bridge/dw_hdmi.c | 7 +++ drivers/gpu/drm/bridge/dw_hdmi.h | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c index 8aa5f61..160f8c7 100644 --- a/drivers/gpu/drm/bridge/dw_hdmi.c +++ b/drivers/gpu/drm/bridge/dw_hdmi.c @@ -715,6 +715,13 @@ static void dw_hdmi_phy_enable_tmds(struct dw_hdmi *hdmi, u8 enable) HDMI_PHY_CONF0_ENTMDS_MASK); } +static void dw_hdmi_phy_enable_spare(struct dw_hdmi *hdmi, u8 enable) +{ + hdmi_mask_writeb(hdmi, enable, HDMI_PHY_CONF0, +HDMI_PHY_CONF0_SPARECTRL_OFFSET, +HDMI_PHY_CONF0_SPARECTRL_MASK); +} + static void dw_hdmi_phy_gen2_pddq(struct dw_hdmi *hdmi, u8 enable) { hdmi_mask_writeb(hdmi, enable, HDMI_PHY_CONF0, diff --git a/drivers/gpu/drm/bridge/dw_hdmi.h b/drivers/gpu/drm/bridge/dw_hdmi.h index baa7849..175dbc8 100644 --- a/drivers/gpu/drm/bridge/dw_hdmi.h +++ b/drivers/gpu/drm/bridge/dw_hdmi.h @@ -837,7 +837,8 @@ enum { HDMI_PHY_CONF0_PDZ_OFFSET = 7, HDMI_PHY_CONF0_ENTMDS_MASK = 0x40, HDMI_PHY_CONF0_ENTMDS_OFFSET = 6, - HDMI_PHY_CONF0_SPARECTRL = 0x20, + HDMI_PHY_CONF0_SPARECTRL_MASK = 0x20, + HDMI_PHY_CONF0_SPARECTRL_OFFSET = 5, HDMI_PHY_CONF0_GEN2_PDDQ_MASK = 0x10, HDMI_PHY_CONF0_GEN2_PDDQ_OFFSET = 4, HDMI_PHY_CONF0_GEN2_TXPWRON_MASK = 0x8, -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Drivers: hv: vmbus: prevent cpu offlining on newer hypervisors
When an SMP Hyper-V guest is running on top of 2012R2 Server and secondary cpus are sent offline (with echo 0 /sys/devices/system/cpu/cpu$cpu/online) the system freeze is observed. This happens due to the fact that on newer hypervisors (Win8, WS2012R2, ...) vmbus channel handlers are distributed across all cpus (see init_vp_index() function in drivers/hv/channel_mgmt.c) and on cpu offlining nobody reassigns them to CPU0. Prevent cpu offlining when vmbus is loaded until the issue is fixed host-side. This patch also disables hibernation but it is OK as it is also broken (MCE error is hit on resume). Suspend still works. Tested with WS2008R2 and WS2012R2. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/vmbus_drv.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 4d6b269..9a82249 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -32,6 +32,7 @@ #include linux/completion.h #include linux/hyperv.h #include linux/kernel_stat.h +#include linux/cpu.h #include asm/hyperv.h #include asm/hypervisor.h #include asm/mshyperv.h @@ -671,6 +672,13 @@ static void vmbus_isr(void) tasklet_schedule(msg_dpc); } +#ifdef CONFIG_HOTPLUG_CPU +static int hyperv_cpu_disable(void) +{ + return -1; +} +#endif + /* * vmbus_bus_init -Main vmbus driver initialization routine. * @@ -711,6 +719,12 @@ static int vmbus_bus_init(int irq) if (ret) goto err_alloc; +#ifdef CONFIG_HOTPLUG_CPU + if ((vmbus_proto_version != VERSION_WS2008) + (vmbus_proto_version != VERSION_WIN7)) + smp_ops.cpu_disable = hyperv_cpu_disable; +#endif + vmbus_request_offers(); return 0; @@ -964,6 +978,11 @@ static void __exit vmbus_exit(void) bus_unregister(hv_bus); hv_cleanup(); acpi_bus_unregister_driver(vmbus_acpi_driver); +#ifdef CONFIG_HOTPLUG_CPU + if ((vmbus_proto_version != VERSION_WS2008) + (vmbus_proto_version != VERSION_WIN7)) + smp_ops.cpu_disable = native_cpu_disable; +#endif } -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: media: lirc: lirc_zilog.c: fix quoted strings split across lines
On Wed, 2014-11-26 at 15:42 +, Luis de Bethencourt wrote: On 26 November 2014 at 01:49, Joe Perches j...@perches.com wrote: [] There is a script I posted a while back that groups various checkpatch types together and makes it a bit easier to do cleanup style patches. https://lkml.org/lkml/2014/7/11/794 That is useful! I just run it on staging/octeon/ and it wrote two patches. Will submit them in a minute. Please make sure and write better commit messages than the script produces. Using checkpatch to get familiar with kernel development is fine and all, but fixing actual defects and submitting new code is way more useful. [] I agree. I was just using checkpatch to learn about the development process. How to create patches, submit patches, follow review, and such. Better to do it with small changes like this first. That's a good way to start. Which makes me wonder. Is my patch accepted? Will it be merged? I can do the proposed logging macro additions in a few days. Not sure yet how the final step of the process when patches get accepted and merged works. You will generally get an email from a maintainer when patches are accepted/rejected or you get feedback asking for various changes. Greg KH does that for drivers/staging but not for drivers/staging/media. Mauro Carvalho Chehab does. These emails are not immediate. It can take 2 or 3 weeks for a response. Sometimes longer, sometimes shorter, sometimes no response ever comes. After a month or so, if you get no response, maybe the maintainer never saw it. You should maybe expand the cc: list for the email. When the patch is more than a trivial style cleanup, Andrew Morton generally picks up orphan patches. For some subsystems, there are tracking mechanisms like patchwork: For instance, netdev (net/ and drivers/net/) uses: http://patchwork.ozlabs.org/project/netdev/list/ and David Miller, the primary networking maintainer is very prompt about updating it. There's this list of patchwork entries, but maintainer activity of these lists vary: https://patchwork.kernel.org/ ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v13 0/12] dw-hdmi: convert imx hdmi to bridge/dw_hdmi
Hi Andy, I have yet to look at this in more detail, but from a quick test starting with patch 3, the HDMI display stays black on Nitrogen6X, and starting with patch 8 I get the following error. imx-drm display-subsystem: [CONNECTOR:21:HDMI-A-1] drm_connector_register failed: -12 [ cut here ] WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:851 __clk_disable+0x6c/0x70() Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.18.0-rc6+ #8377 Backtrace: [80012414] (dump_backtrace) from [80012754] (show_stack+0x20/0x24) r6:0353 r5: r4:8083ea08 r3: [80012734] (show_stack) from [805ae670] (dump_stack+0x8c/0x9c) [805ae5e4] (dump_stack) from [80022744] (warn_slowpath_common+0x80/0x9c) r5:0009 r4: [800226c4] (warn_slowpath_common) from [8002281c] (warn_slowpath_null+0x2c/0x34) r8:b721c610 r7:b72b0400 r6:b735504c r5:8113 r4:b735504c [800227f0] (warn_slowpath_null) from [80458088] (__clk_disable+0x6c/0x70) [8045801c] (__clk_disable) from [804581a8] (clk_disable+0x34/0x40) r4:b735504c r3:b700e000 [80458174] (clk_disable) from [803241f0] (dw_hdmi_imx_unbind+0x30/0x60) r5:b7355010 r4:b7219a10 [803241c0] (dw_hdmi_imx_unbind) from [8032fc84] (component_unbind.isra.3+0x40/0x78) r8:b72a1e40 r7:b725f158 r6:b72b0400 r5:b725f158 r4:b725f4c0 r3:803241c0 [8032fc44] (component_unbind.isra.3) from [8032fd44] (component_unbind_all+0x88/0xb8) r5:b725f4c0 r4:b725f140 [8032fcbc] (component_unbind_all) from [80321a3c] (imx_drm_driver_load+0x100/0x13c) r7:b72b05cc r6:fff4 r5:b7355010 r4:b72b0400 [8032193c] (imx_drm_driver_load) from [8030c260] (drm_dev_register+0xb8/0x114) r7:b686ad10 r6: r5: r4:b72b0400 [8030c1a8] (drm_dev_register) from [8030dd58] (drm_platform_init+0x54/0xe8) r6:80844bf4 r5:b721c600 r4:b72b0400 r3: [8030dd04] (drm_platform_init) from [803218e8] (imx_drm_bind+0x20/0x28) r6:b725f140 r5:000c r4:b686ad70 [803218c8] (imx_drm_bind) from [8032f9b0] (try_to_bring_up_master.part.2+0xd8/0x118) [8032f8d8] (try_to_bring_up_master.part.2) from [8032fbe4] (component_add+0xa0/0x100) r8:b72a1c40 r7:80602b6c r6:b72a1e40 r5:808451e8 r4:b725f140 r3: [8032fb44] (component_add) from [8032330c] (ipu_drm_probe+0x7c/0x150) r7:b682ba10 r6:b77b3cc0 r5:b682ba00 r4:b77b4868 [80323290] (ipu_drm_probe) from [80336640] (platform_drv_probe+0x54/0xb4) r9: r8: r7:80844e94 r6:80844e94 r5:fdfb r4:b682ba10 [803365ec] (platform_drv_probe) from [803348a8] (driver_probe_device+0x128/0x25c) r7:80844e94 r6: r5:808bc064 r4:b682ba10 [80334780] (driver_probe_device) from [80334a2c] (__device_attach+0x50/0x54) r8: r7:b721c410 r6:803349dc r5:b682ba10 r4:80844e94 r3:80336838 [803349dc] (__device_attach) from [80332c34] (bus_for_each_drv+0x68/0x9c) r5:b682ba10 r4: [80332bcc] (bus_for_each_drv) from [8033473c] (device_attach+0x84/0x98) r6:808454e0 r5:b682ba44 r4:b682ba10 [803346b8] (device_attach) from [80333d14] (bus_probe_device+0x94/0xb8) r6:808454e0 r5:b682ba10 r4:b682ba18 r3:b7046800 [80333c80] (bus_probe_device) from [80331e58] (device_add+0x450/0x530) r6:b682ba10 r5: r4:b682ba18 r3: [80331a08] (device_add) from [803362c8] (platform_device_add+0xc4/0x228) r9:0006 r8:b721c410 r7:b7079cc4 r6:b682ba10 r5:b682ba00 r4: [80336204] (platform_device_add) from [80336b60] (platform_device_register_full+0xcc/0xf0) r7:b7079cc4 r6:b7079ce0 r5:b682ba00 r4:b7079ce0 [80336a94] (platform_device_register_full) from [80328354] (ipu_add_client_devices.isra.10+0x164/0x19c) r5: r4:b7079ce0 [803281f0] (ipu_add_client_devices.isra.10) from [80328940] (ipu_probe+0x5b4/0x740) r10:808450d4 r9:0001 r8:b7028180 r7:b72b0010 r6:808450d4 r5: r4:b721c410 [8032838c] (ipu_probe) from [80336640] (platform_drv_probe+0x54/0xb4) r10: r9:b725f580 r8: r7:80845078 r6:80845078 r5:fdfb r4:b721c410 [803365ec] (platform_drv_probe) from [803348a8] (driver_probe_device+0x128/0x25c) r7:80845078 r6: r5:808bc064 r4:b721c410 [80334780] (driver_probe_device) from [80334acc] (__driver_attach+0x9c/0xa0) r8:807ab5e8 r7: r6:b721c444 r5:80845078 r4:b721c410 r3: [80334a30] (__driver_attach) from [80332b6c] (bus_for_each_dev+0x70/0xa4) r6:80334a30 r5:80845078 r4: r3:b704685c [80332afc] (bus_for_each_dev) from [80334334] (driver_attach+0x2c/0x30) r6:808454e0 r5:b728d000 r4:80845078 [80334308] (driver_attach) from [80333fac] (bus_add_driver+0x15c/0x204) [80333e50] (bus_add_driver) from [803352d4] (driver_register+0x88/0x108) r7:b7078000 r6:807d86c0 r5:8082be60 r4:80845078 [8033524c] (driver_register) from [8033656c] (__platform_driver_register+0x64/0x6c) r5:8082be60 r4:8082be60 [80336508] (__platform_driver_register) from [807d86dc] (imx_ipu_driver_init+0x1c/0x20) [807d86c0] (imx_ipu_driver_init) from [80008980] (do_one_initcall+0x9c/0x1dc) [800088e4] (do_one_initcall) from [807abe5c] (kernel_init_freeable+0x144/0x1e8)
[PATCH] staging: lustre: fix sparse warnings related to lock context imbalance
Add __acquires() and __releases() function annotations, to fix sparse warnings related to lock context imbalance. This fixes the following warnings: drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c:153:5: warning: context imbalance in 'cfs_trace_lock_tcd' - wrong count at exit drivers/staging/lustre/lustre/libcfs/hash.c:128:1: warning: context imbalance in 'cfs_hash_spin_lock' - wrong count at exit drivers/staging/lustre/lustre/libcfs/hash.c:142:9: warning: context imbalance in 'cfs_hash_rw_lock' - wrong count at exit drivers/staging/lustre/lustre/ptlrpc/../../lustre/ldlm/l_lock.c:57:17: warning: context imbalance in 'lock_res_and_lock' - wrong count at exit drivers/staging/lustre/lustre/libcfs/libcfs_lock.c:93:1: warning: context imbalance in 'cfs_percpt_lock' - wrong count at exit Signed-off-by: Loic Pefferkorn l...@loicp.eu --- drivers/staging/lustre/lustre/libcfs/hash.c | 4 drivers/staging/lustre/lustre/libcfs/libcfs_lock.c | 2 ++ drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c | 2 ++ drivers/staging/lustre/lustre/obdclass/cl_object.c | 2 ++ 4 files changed, 10 insertions(+) diff --git a/drivers/staging/lustre/lustre/libcfs/hash.c b/drivers/staging/lustre/lustre/libcfs/hash.c index 32da783..7c6e2a3 100644 --- a/drivers/staging/lustre/lustre/libcfs/hash.c +++ b/drivers/staging/lustre/lustre/libcfs/hash.c @@ -126,18 +126,21 @@ cfs_hash_nl_unlock(union cfs_hash_lock *lock, int exclusive) {} static inline void cfs_hash_spin_lock(union cfs_hash_lock *lock, int exclusive) + __acquires(lock-spin) { spin_lock(lock-spin); } static inline void cfs_hash_spin_unlock(union cfs_hash_lock *lock, int exclusive) + __releases(lock-spin) { spin_unlock(lock-spin); } static inline void cfs_hash_rw_lock(union cfs_hash_lock *lock, int exclusive) + __acquires(lock-rw) { if (!exclusive) read_lock(lock-rw); @@ -147,6 +150,7 @@ cfs_hash_rw_lock(union cfs_hash_lock *lock, int exclusive) static inline void cfs_hash_rw_unlock(union cfs_hash_lock *lock, int exclusive) + __releases(lock-rw) { if (!exclusive) read_unlock(lock-rw); diff --git a/drivers/staging/lustre/lustre/libcfs/libcfs_lock.c b/drivers/staging/lustre/lustre/libcfs/libcfs_lock.c index 2c199c7..1e529fc 100644 --- a/drivers/staging/lustre/lustre/libcfs/libcfs_lock.c +++ b/drivers/staging/lustre/lustre/libcfs/libcfs_lock.c @@ -91,6 +91,7 @@ EXPORT_SYMBOL(cfs_percpt_lock_alloc); */ void cfs_percpt_lock(struct cfs_percpt_lock *pcl, int index) + __acquires(pcl-pcl_locks[index]) { int ncpt = cfs_cpt_number(pcl-pcl_cptab); int i; @@ -125,6 +126,7 @@ EXPORT_SYMBOL(cfs_percpt_lock); /** unlock a CPU partition */ void cfs_percpt_unlock(struct cfs_percpt_lock *pcl, int index) + __releases(pcl-pcl_locks[index]) { int ncpt = cfs_cpt_number(pcl-pcl_cptab); int i; diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c index 976c61e..257669b 100644 --- a/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c +++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c @@ -151,6 +151,7 @@ cfs_trace_buf_type_t cfs_trace_buf_idx_get(void) * for details. */ int cfs_trace_lock_tcd(struct cfs_trace_cpu_data *tcd, int walking) + __acquires(tcd-tc_lock) { __LASSERT(tcd-tcd_type CFS_TCD_TYPE_MAX); if (tcd-tcd_type == CFS_TCD_TYPE_IRQ) @@ -165,6 +166,7 @@ int cfs_trace_lock_tcd(struct cfs_trace_cpu_data *tcd, int walking) } void cfs_trace_unlock_tcd(struct cfs_trace_cpu_data *tcd, int walking) + __releases(tcd-tcd_lock) { __LASSERT(tcd-tcd_type CFS_TCD_TYPE_MAX); if (tcd-tcd_type == CFS_TCD_TYPE_IRQ) diff --git a/drivers/staging/lustre/lustre/obdclass/cl_object.c b/drivers/staging/lustre/lustre/obdclass/cl_object.c index ce96bd2..8577f97 100644 --- a/drivers/staging/lustre/lustre/obdclass/cl_object.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_object.c @@ -193,6 +193,7 @@ static spinlock_t *cl_object_attr_guard(struct cl_object *o) * cl_object_attr_get(), cl_object_attr_set(). */ void cl_object_attr_lock(struct cl_object *o) + __acquires(cl_object_attr_guard(o)) { spin_lock(cl_object_attr_guard(o)); } @@ -202,6 +203,7 @@ EXPORT_SYMBOL(cl_object_attr_lock); * Releases data-attributes lock, acquired by cl_object_attr_lock(). */ void cl_object_attr_unlock(struct cl_object *o) + __releases(cl_object_attr_guard(o)) { spin_unlock(cl_object_attr_guard(o)); } -- 2.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v13 08/12] drm: bridge/dw_hdmi: add mode_valid support
Am Mittwoch, den 26.11.2014, 21:33 +0800 schrieb Andy Yan: some platform may not support all the display mode, add mode_valid interface check it also add drm_connector_register which add a debugfs interface for dump display modes and edid information Signed-off-by: Andy Yan andy@rock-chips.com --- Changes in v13: None Changes in v12: None Changes in v11: None Changes in v10: None Changes in v9: None Changes in v8: None Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None drivers/gpu/drm/bridge/dw_hdmi.c | 17 + include/drm/bridge/dw_hdmi.h | 2 ++ 2 files changed, 19 insertions(+) diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c index 5e88c8d..b13e782 100644 --- a/drivers/gpu/drm/bridge/dw_hdmi.c +++ b/drivers/gpu/drm/bridge/dw_hdmi.c @@ -1406,6 +1406,20 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector) return 0; } +static enum drm_mode_status +dw_hdmi_connector_mode_valid(struct drm_connector *connector, + struct drm_display_mode *mode) +{ + struct dw_hdmi *hdmi = container_of(connector, +struct dw_hdmi, connector); + enum drm_mode_status mode_status = MODE_OK; + + if (hdmi-plat_data-mode_valid) + mode_status = hdmi-plat_data-mode_valid(connector, mode); + + return mode_status; +} + static struct drm_encoder *dw_hdmi_connector_best_encoder(struct drm_connector *connector) { @@ -1430,6 +1444,7 @@ static struct drm_connector_funcs dw_hdmi_connector_funcs = { static struct drm_connector_helper_funcs dw_hdmi_connector_helper_funcs = { .get_modes = dw_hdmi_connector_get_modes, + .mode_valid = dw_hdmi_connector_mode_valid, .best_encoder = dw_hdmi_connector_best_encoder, }; @@ -1631,6 +1646,8 @@ int dw_hdmi_bind(struct device *dev, struct device *master, dev_set_drvdata(dev, hdmi); + drm_connector_register(hdmi-connector); + This is not right, the connector is registered by the imx-drm core in the drm_driver .load callback. regards Philipp ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v13 07/12] drm: bridge/dw_hdmi: add support for multi-byte register width access
Am Mittwoch, den 26.11.2014, 21:32 +0800 schrieb Andy Yan: On rockchip rk3288, only word(32-bit) accesses are permitted for hdmi registers. Byte width accesses (writeb, readb) generate an imprecise external abort. Signed-off-by: Andy Yan andy@rock-chips.com --- Changes in v13: None Changes in v12: None Changes in v11: None Changes in v10: None Changes in v9: None Changes in v8: None Changes in v7: None Changes in v6: - refactor register access without reg_shift Changes in v5: - refactor reg-io-width Changes in v4: None Changes in v3: - split multi-register access to one indepent patch drivers/gpu/drm/bridge/dw_hdmi.c | 57 +++- 1 file changed, 51 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c index a53bf63..5e88c8d 100644 --- a/drivers/gpu/drm/bridge/dw_hdmi.c +++ b/drivers/gpu/drm/bridge/dw_hdmi.c @@ -100,6 +100,11 @@ struct hdmi_data_info { struct hdmi_vmode video_mode; }; +union dw_reg_ptr { + u32 __iomem *p32; + u8 __iomem *p8; +}; I see no need to introduce this. Just explicitly multiply the offset in dw_hdmi_writel. struct dw_hdmi { struct drm_connector connector; struct drm_encoder *encoder; @@ -121,20 +126,43 @@ struct dw_hdmi { struct regmap *regmap; struct i2c_adapter *ddc; - void __iomem *regs; + union dw_reg_ptr regs; Keep this as void __iomem * unsigned int sample_rate; int ratio; + + void (*write)(struct dw_hdmi *hdmi, u8 val, int offset); + u8 (*read)(struct dw_hdmi *hdmi, int offset); }; +static void dw_hdmi_writel(struct dw_hdmi *hdmi, u8 val, int offset) +{ + writel(val, hdmi-regs.p32 + offset); hdmi-regs + 4 * offset +} + +static u8 dw_hdmi_readl(struct dw_hdmi *hdmi, int offset) +{ + return readl(hdmi-regs.p32 + offset); same here +} + +static void dw_hdmi_writeb(struct dw_hdmi *hdmi, u8 val, int offset) +{ + writeb(val, hdmi-regs.p8 + offset); +} + +static u8 dw_hdmi_readb(struct dw_hdmi *hdmi, int offset) +{ + return readb(hdmi-regs.p8 + offset); +} + static inline void hdmi_writeb(struct dw_hdmi *hdmi, u8 val, int offset) { - writeb(val, hdmi-regs + offset); + hdmi-write(hdmi, val, offset); } static inline u8 hdmi_readb(struct dw_hdmi *hdmi, int offset) { - return readb(hdmi-regs + offset); + return hdmi-read(hdmi, offset); } static void hdmi_modb(struct dw_hdmi *hdmi, u8 data, u8 mask, unsigned reg) @@ -1508,6 +1536,7 @@ int dw_hdmi_bind(struct device *dev, struct device *master, struct dw_hdmi *hdmi; struct resource *iores; int ret, irq; + u32 val = 1; hdmi = devm_kzalloc(pdev-dev, sizeof(*hdmi), GFP_KERNEL); if (!hdmi) @@ -1520,6 +1549,22 @@ int dw_hdmi_bind(struct device *dev, struct device *master, hdmi-ratio = 100; hdmi-encoder = encoder; + of_property_read_u32(np, reg-io-width, val); + + switch (val) { + case 4: + hdmi-write = dw_hdmi_writel; + hdmi-read = dw_hdmi_readl; + break; + case 1: + hdmi-write = dw_hdmi_writeb; + hdmi-read = dw_hdmi_readb; + break; + default: + dev_err(dev, reg-io-width must be 1 or 4\n); + return -EINVAL; + } + ddc_node = of_parse_phandle(np, ddc-i2c-bus, 0); if (ddc_node) { hdmi-ddc = of_find_i2c_adapter_by_node(ddc_node); @@ -1544,9 +1589,9 @@ int dw_hdmi_bind(struct device *dev, struct device *master, return ret; iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); - hdmi-regs = devm_ioremap_resource(dev, iores); - if (IS_ERR(hdmi-regs)) - return PTR_ERR(hdmi-regs); + hdmi-regs.p32 = devm_ioremap_resource(dev, iores); + if (IS_ERR(hdmi-regs.p32)) + return PTR_ERR(hdmi-regs.p32); /* Product and revision IDs */ dev_info(dev, regards Philipp ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 1/2] drm: imx: Move imx-drm driver out of staging
Am Mittwoch, den 26.11.2014, 09:43 +1000 schrieb Dave Airlie: On 25 November 2014 at 01:33, Philipp Zabel p.za...@pengutronix.de wrote: The imx-drm driver was put into staging mostly for the following reasons, all of which have been addressed or superseded: - convert the irq driver to use linear irq domains - work out the device tree bindings, this lead to the common of_graph bindings being used - factor out common helper functions, this mostly resulted in the component framework and drm of_graph helpers. Before adding new fixes, and certainly before adding new features, move it into its proper place below drivers/gpu/drm. Signed-off-by: Philipp Zabel p.za...@pengutronix.de --- FYI I've merged this into drm-next, which I think is probably the best place. Thank you. This would have been my request in the cover letter that I prepared and then forgot to send out with the patches. regards Philipp ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
atualização sua conta
Uma tentativa foi feita para sua conta a partir de um computador desconhecido. para a segurança da sua conta, estamos prontos para abrir uma consulta ou atualização sua conta. Por favor, preencha os dados abaixo: nome: Endereço de email: password: Re-digite a senha: Tel: Te agradece sistema Administrador Centro ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging:rtl8723au: core: fix checkpatch error: that open brace { should be on the previous line
On Tue, Nov 11, 2014 at 03:28:57PM +0530, Sanjeev Sharma wrote: This is a patch to the rtw_cmd.c file that fixes following Error. ERROR: that open brace { should be on the previous line This patch does much more than that :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 10/10] staging: lustre: ldlm: Add a space in debug output
On Sun, Nov 23, 2014 at 02:37:57PM +0100, Andreas Ruprecht wrote: A space which was forgotten in a CDEBUG output is added by this patch. Signed-off-by: Andreas Ruprecht rup...@einserver.de --- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c index 13bee5a..e089c3d 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c @@ -2254,7 +2254,7 @@ static void ldlm_cancel_unused_locks_for_replay(struct ldlm_namespace *ns) int canceled; LIST_HEAD(cancels); - CDEBUG(D_DLMTRACE, Dropping as many unused locks as possible before + CDEBUG(D_DLMTRACE, Dropping as many unused locks as possible before replay for namespace %s (%d)\n, ldlm_ns_name(ns), ns-ns_nr_unused); -- 1.9.1 Doesn't apply to my tree :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 0/2] fix some sparse warnings in lustre
On Mon, Nov 24, 2014 at 07:55:40PM +0100, Zahari Doychev wrote: The two patches fix several sparse warning in the lustre module. Zahari Doychev (2): [drivers] staging/lustre: fix sparse warnings [drivers] staging/lustre: fix sparse warnings drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 14 +- drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 15 ++- 2 files changed, 19 insertions(+), 10 deletions(-) Please fix up and resend anything still pending, I've purged your patches from my queue now as they all seem to not be correct :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: lustre: fix sparse warnings related to lock context imbalance
On Wed, Nov 26, 2014 at 05:15:48PM +0100, Loic Pefferkorn wrote: Add __acquires() and __releases() function annotations, to fix sparse warnings related to lock context imbalance. This fixes the following warnings: drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c:153:5: warning: context imbalance in 'cfs_trace_lock_tcd' - wrong count at exit drivers/staging/lustre/lustre/libcfs/hash.c:128:1: warning: context imbalance in 'cfs_hash_spin_lock' - wrong count at exit drivers/staging/lustre/lustre/libcfs/hash.c:142:9: warning: context imbalance in 'cfs_hash_rw_lock' - wrong count at exit drivers/staging/lustre/lustre/ptlrpc/../../lustre/ldlm/l_lock.c:57:17: warning: context imbalance in 'lock_res_and_lock' - wrong count at exit drivers/staging/lustre/lustre/libcfs/libcfs_lock.c:93:1: warning: context imbalance in 'cfs_percpt_lock' - wrong count at exit Signed-off-by: Loic Pefferkorn l...@loicp.eu --- drivers/staging/lustre/lustre/libcfs/hash.c | 4 drivers/staging/lustre/lustre/libcfs/libcfs_lock.c | 2 ++ drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c | 2 ++ drivers/staging/lustre/lustre/obdclass/cl_object.c | 2 ++ 4 files changed, 10 insertions(+) diff --git a/drivers/staging/lustre/lustre/libcfs/hash.c b/drivers/staging/lustre/lustre/libcfs/hash.c index 32da783..7c6e2a3 100644 --- a/drivers/staging/lustre/lustre/libcfs/hash.c +++ b/drivers/staging/lustre/lustre/libcfs/hash.c @@ -126,18 +126,21 @@ cfs_hash_nl_unlock(union cfs_hash_lock *lock, int exclusive) {} static inline void cfs_hash_spin_lock(union cfs_hash_lock *lock, int exclusive) + __acquires(lock-spin) { spin_lock(lock-spin); } static inline void cfs_hash_spin_unlock(union cfs_hash_lock *lock, int exclusive) + __releases(lock-spin) { spin_unlock(lock-spin); } Ugh, how horrid, please just delete these functions and push down the spin_lock/unlock calls down into the places these are called. static inline void cfs_hash_rw_lock(union cfs_hash_lock *lock, int exclusive) + __acquires(lock-rw) { if (!exclusive) read_lock(lock-rw); @@ -147,6 +150,7 @@ cfs_hash_rw_lock(union cfs_hash_lock *lock, int exclusive) static inline void cfs_hash_rw_unlock(union cfs_hash_lock *lock, int exclusive) + __releases(lock-rw) { if (!exclusive) read_unlock(lock-rw); Same for these. diff --git a/drivers/staging/lustre/lustre/libcfs/libcfs_lock.c b/drivers/staging/lustre/lustre/libcfs/libcfs_lock.c index 2c199c7..1e529fc 100644 --- a/drivers/staging/lustre/lustre/libcfs/libcfs_lock.c +++ b/drivers/staging/lustre/lustre/libcfs/libcfs_lock.c @@ -91,6 +91,7 @@ EXPORT_SYMBOL(cfs_percpt_lock_alloc); */ void cfs_percpt_lock(struct cfs_percpt_lock *pcl, int index) + __acquires(pcl-pcl_locks[index]) { int ncpt = cfs_cpt_number(pcl-pcl_cptab); int i; @@ -125,6 +126,7 @@ EXPORT_SYMBOL(cfs_percpt_lock); /** unlock a CPU partition */ void cfs_percpt_unlock(struct cfs_percpt_lock *pcl, int index) + __releases(pcl-pcl_locks[index]) { int ncpt = cfs_cpt_number(pcl-pcl_cptab); int i; diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c index 976c61e..257669b 100644 --- a/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c +++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c @@ -151,6 +151,7 @@ cfs_trace_buf_type_t cfs_trace_buf_idx_get(void) * for details. */ int cfs_trace_lock_tcd(struct cfs_trace_cpu_data *tcd, int walking) + __acquires(tcd-tc_lock) { __LASSERT(tcd-tcd_type CFS_TCD_TYPE_MAX); if (tcd-tcd_type == CFS_TCD_TYPE_IRQ) @@ -165,6 +166,7 @@ int cfs_trace_lock_tcd(struct cfs_trace_cpu_data *tcd, int walking) } void cfs_trace_unlock_tcd(struct cfs_trace_cpu_data *tcd, int walking) + __releases(tcd-tcd_lock) { __LASSERT(tcd-tcd_type CFS_TCD_TYPE_MAX); if (tcd-tcd_type == CFS_TCD_TYPE_IRQ) diff --git a/drivers/staging/lustre/lustre/obdclass/cl_object.c b/drivers/staging/lustre/lustre/obdclass/cl_object.c index ce96bd2..8577f97 100644 --- a/drivers/staging/lustre/lustre/obdclass/cl_object.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_object.c @@ -193,6 +193,7 @@ static spinlock_t *cl_object_attr_guard(struct cl_object *o) * cl_object_attr_get(), cl_object_attr_set(). */ void cl_object_attr_lock(struct cl_object *o) + __acquires(cl_object_attr_guard(o)) { spin_lock(cl_object_attr_guard(o)); } @@ -202,6 +203,7 @@ EXPORT_SYMBOL(cl_object_attr_lock); * Releases data-attributes lock, acquired by cl_object_attr_lock(). */ void cl_object_attr_unlock(struct cl_object *o) + __releases(cl_object_attr_guard(o)) { spin_unlock(cl_object_attr_guard(o)); }
Re: [PATCH] staging: unisys: Remove chanstub files
On Fri, Nov 07, 2014 at 10:17:40AM -0800, Greg KH wrote: On Fri, Nov 07, 2014 at 12:58:24PM -0500, Ken Depro wrote: While fixing the CamelCase checks for the functions in the chanstub source and header files, I discovered they are no longer being used. This patch removes the two chanstub files, and deletes the #include of these files from uislib.c and uisqueue.c. It also removes the chanstub.o from the channels Makefile. Are you sure this patch is correct? You now have no MODULE_LICENSE or other MODULE_* information for this module, and you have no module_init() or _exit calls. You might not need the init/exit calls, but you will need the MODULE_LICENSE macro. Given that you seem to be ignoring my emails, I'll just go dump the pending patches you have sent me for this driver, as there seems to be a problem in the feedback loop here. Please resend all of your pending patches after fixing this. greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 00/10] parser.h and parser.c patches
On Wed, Nov 12, 2014 at 11:28:15AM -0500, Jeffrey Brown wrote: Sorry for all of the messy patches from before but here are the improved patches for parser.h and parser.c. The camel cases are grouped on functions and structs that occurs in both files. You have to do a 'vN' where 'N' is a number saying that this obsoletes previous patches from you. And I'm totally confused here as to what patches to apply, so please, just resend all of the pending unisys patches you have, in the order you need me to apply them in. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 11/11] staging: unisys: small bug parser.c
On Thu, Nov 13, 2014 at 09:56:39AM -0500, Jeffrey Brown wrote: Fixed small bug in parser.c by removing cleanups: in parser_init _guts struct. Replaced it with proper error handling code and removed the instances of rc = NULL in the code. rc = NULL is redudant Signed-off-by: Jeffrey Brown jeffrey.br...@unisys.com --- drivers/staging/unisys/visorchipset/parser.c | 46 ++--- 1 files changed, 11 insertions(+), 35 deletions(-) where are patches 01/11 - 10/11? Totally confused. What would you do if you were on the receiving end of all of this mess? Am just now deleting all unisys patches from my queue. greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: unisys: get rid of channel stub
I _strongly_ suggest unisys get their act together here. The number of patches that were sent recently that make no sense at all is horrid. I've now purged all of them from my to-apply queue, please resend _everything_ that you have, in the correct order, _AFTER_ you all review them among yourselves and agree that they are correct. I also want to see signed-off-by: from more than one person here, showing that someone has actually reviewed them, and takes responsibility for them. In other words, start acting like a maintainer of a subsystem, don't throw random crap all over the place and expect me to sort it out. Otherwise I'll sort it out by just deleting the code from the tree. greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 2/2] staging: android: ion: One function call less in ion_buffer_create() after error detection
On Sun, Nov 23, 2014 at 07:44:08PM +0100, SF Markus Elfring wrote: From: Markus Elfring elfr...@users.sourceforge.net Date: Sun, 23 Nov 2014 19:12:29 +0100 The jump label err1 was used by the ion_buffer_create() function in case of a memory allocation failure just to pass a null pointer to a vfree() function call by a data structure element. This implementation detail could be improved by the deletion of this inappropriate jump label. Signed-off-by: Markus Elfring elfr...@users.sourceforge.net --- drivers/staging/android/ion/ion.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index df12cc3..7a26b85 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -226,7 +226,7 @@ static struct ion_buffer *ion_buffer_create(struct ion_heap *heap, buffer-pages = vmalloc(sizeof(struct page *) * num_pages); if (!buffer-pages) { ret = -ENOMEM; - goto err1; + goto err2; } for_each_sg(table-sgl, sg, table-nents, i) { @@ -262,7 +262,6 @@ static struct ion_buffer *ion_buffer_create(struct ion_heap *heap, err: heap-ops-unmap_dma(heap, buffer); heap-ops-free(buffer); -err1: vfree(buffer-pages); err2: Now we have err and err2, which doesn't make much sense, please fix up. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Drivers:Staging:octeon: Fixed missing a blank line warning
On Thu, Nov 20, 2014 at 11:31:14PM +0530, Lekshmi wrote: The following checkpatch warning was fixed: WARNING: Missing a blank line after declarations Signed-off-by: Lekshmi andnlnb...@gmail.com I need a full name here, sorry. Please fix and resend. greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Drivers:staging:octeon: Fixed checkpatch warning
On Wed, Nov 26, 2014 at 05:58:37PM +0530, Athira Lekshmi C V wrote: Fixed the checkpatch warning: WARNING: Missing a blank line after declarations Signed-off-by: Athira Lekshmi C V andnlnb...@gmail.com What is the C V at the end of the name here? Is that your full name? I need a real name, not initials. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 4/9] staging: panel: Use defined value or checking module params state
On Wed, Nov 19, 2014 at 09:38:46PM +0100, Mariusz Gorski wrote: Avoid magic number and use a comparison with a defined value instead that checks whether module param has been set by the user to some value at loading time. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com Acked-by: Willy Tarreau w...@1wt.eu --- v2: Don't introduce new macros for param value check drivers/staging/panel/panel.c | 86 +-- 1 file changed, 43 insertions(+), 43 deletions(-) Ugh, I messed up here, and applied the first series, which was acked. Mariusz, can you resend the patches that I didn't apply, I can't seem to get the rest of these to work properly. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: rtl8188eu: core: rtw_wlan_util: replaced __inline with inline
On Thu, Nov 20, 2014 at 04:03:23PM +0100, Abel Moyo wrote: Changed return type of function get_my_bssid from __inline to inline Signed-off-by: Abel Moyo abelmoyo...@gmail.com --- drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c index c495977..700c070 100644 --- a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c +++ b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c @@ -405,7 +405,7 @@ int get_bsstype(unsigned short capability) return 0; } -__inline u8 *get_my_bssid(struct wlan_bssid_ex *pnetwork) +inline u8 *get_my_bssid(struct wlan_bssid_ex *pnetwork) I agree with Dan, just remove inline. Actually, just open code this by removing the function entirely, it's pointless. greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Drivers:Staging:rtl8188eu:hal:usb_halinit.c: Added blank lines after declarations
On Sat, Nov 22, 2014 at 11:36:40AM +0530, Anjana Sasindran wrote: This patch fixes the five checkpatch.pl warnings: WARNING:Missing a blank line after declaration Signed-off-by: Anjana Sasindran anjanasasindran...@gmail.com --- drivers/staging/rtl8188eu/hal/usb_halinit.c | 6 ++ 1 file changed, 6 insertions(+) Why send 2 identical copies of this? Which to apply? How about neither, please resend it properly... ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Drivers:staging:wlan-ng: Fixed checkpatch warning
On Tue, Nov 25, 2014 at 05:16:40PM +0530, Athira Lekshmi C V wrote: The following checkpatch warning was fixed WARNING: line over 80 characters Signed-off-by: Athira Lekshmi C V andnlnb...@gmail.com --- drivers/staging/wlan-ng/prism2fw.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) Doesn't apply to my tree :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/2] iio: Add support for waveform output
On 11/26/2014 10:45 PM, George McCollister wrote: Output can be held high or low for a specified period of time. Support for waveform capture could be added in the future. That's a PWM device? ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: octeon: Fix checkpatch warning
On Wed, Nov 26, 2014 at 01:45:23PM -0800, Greg KH wrote: On Tue, Nov 25, 2014 at 01:26:14PM +, Luis de Bethencourt wrote: This patch fixes the checkpatch.pl warnings: WARNING: line over 80 characters + int cores_in_use = core_state.baseline_cores - atomic_read(core_state.available_cores); WARNING: line over 80 characters + skb-data = skb-head + work-packet_ptr.s.addr - cvmx_ptr_to_phys(skb-head); Signed-off-by: Luis de Bethencourt l...@debethencourt.com --- drivers/staging/octeon/ethernet-rx.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c index 44e372f..bd83f55 100644 --- a/drivers/staging/octeon/ethernet-rx.c +++ b/drivers/staging/octeon/ethernet-rx.c @@ -295,7 +295,8 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) */ union cvmx_pow_wq_int_cntx counts; int backlog; - int cores_in_use = core_state.baseline_cores - atomic_read(core_state.available_cores); + int cores_in_use = core_state.baseline_cores - + atomic_read(core_state.available_cores); counts.u64 = cvmx_read_csr(CVMX_POW_WQ_INT_CNTX(pow_receive_group)); backlog = counts.s.iq_cnt + counts.s.ds_cnt; if (backlog budget * cores_in_use napi != NULL) @@ -324,7 +325,8 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) * buffer. */ if (likely(skb_in_hw)) { - skb-data = skb-head + work-packet_ptr.s.addr - cvmx_ptr_to_phys(skb-head); + skb-data = skb-head + work-packet_ptr.s.addr - + cvmx_ptr_to_phys(skb-head); prefetch(skb-data); skb-len = work-len; skb_set_tail_pointer(skb, skb-len); -- 2.1.3 No longer applies to my tree :( I'm confused. I just tried applying it to what I think is your tree is and it worked. https://git.kernel.org/cgit/linux/kernel/git/gregkh/staging.git/log/?h=staging-next Do I have this wrong? Sorry :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: media: lirc: lirc_zilog.c: fix quoted strings split across lines
On Wed, Nov 26, 2014 at 08:05:55AM -0800, Joe Perches wrote: On Wed, 2014-11-26 at 15:42 +, Luis de Bethencourt wrote: On 26 November 2014 at 01:49, Joe Perches j...@perches.com wrote: [] There is a script I posted a while back that groups various checkpatch types together and makes it a bit easier to do cleanup style patches. https://lkml.org/lkml/2014/7/11/794 That is useful! I just run it on staging/octeon/ and it wrote two patches. Will submit them in a minute. Please make sure and write better commit messages than the script produces. Will do :) Using checkpatch to get familiar with kernel development is fine and all, but fixing actual defects and submitting new code is way more useful. [] I agree. I was just using checkpatch to learn about the development process. How to create patches, submit patches, follow review, and such. Better to do it with small changes like this first. That's a good way to start. Which makes me wonder. Is my patch accepted? Will it be merged? I can do the proposed logging macro additions in a few days. Not sure yet how the final step of the process when patches get accepted and merged works. You will generally get an email from a maintainer when patches are accepted/rejected or you get feedback asking for various changes. Greg KH does that for drivers/staging but not for drivers/staging/media. Mauro Carvalho Chehab does. These emails are not immediate. It can take 2 or 3 weeks for a response. Sometimes longer, sometimes shorter, sometimes no response ever comes. I understand. Busy people. After a month or so, if you get no response, maybe the maintainer never saw it. You should maybe expand the cc: list for the email. When the patch is more than a trivial style cleanup, Andrew Morton generally picks up orphan patches. For some subsystems, there are tracking mechanisms like patchwork: For instance, netdev (net/ and drivers/net/) uses: http://patchwork.ozlabs.org/project/netdev/list/ and David Miller, the primary networking maintainer is very prompt about updating it. There's this list of patchwork entries, but maintainer activity of these lists vary: https://patchwork.kernel.org/ Very interesting. I will follow the process through and learn on the way. Thanks Joe! ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 3/3] rtl8188eu: Remove leading spaces in rtw_led.c
On Fri, Nov 07, 2014 at 12:24:28AM +0100, Krzysztof Konopko wrote: According to Linux coding convention leading spaces are not allowed. This patch removes leading spaces in rtw_led.c Signed-off-by: Krzysztof Konopko k...@konagma.com --- drivers/staging/rtl8188eu/core/rtw_led.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_led.c b/drivers/staging/rtl8188eu/core/rtw_led.c index 1b8264b..5d7e8ec 100644 --- a/drivers/staging/rtl8188eu/core/rtw_led.c +++ b/drivers/staging/rtl8188eu/core/rtw_led.c @@ -40,6 +40,7 @@ void BlinkTimerCallback(void *data) void BlinkWorkItemCallback(struct work_struct *work) { struct LED_871x *pLed = container_of(work, struct LED_871x, BlinkWorkItem); + BlinkHandler(pLed); } This is not a fix leading space change :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Drivers:staging:comedi:drivers: Fixed checkpatch warning
On Wed, Nov 26, 2014 at 04:56:55PM +0530, Athira Lekshmi C V wrote: Fixed the checkpatch warning: WARNING: please, no space before tabs Signed-off-by: Athira Lekshmi C V andnlnb...@gmail.com Same question about the name here as before. Also, be more specific in your subject as to what you are changing. fixed checkpatch warning is very vague. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] hv: hv_fcopy: drop the obsolete message on transfer failure
On Tue, Nov 11, 2014 at 09:03:26PM -0800, Dexuan Cui wrote: In the case the user-space daemon crashes, hangs or is killed, we need to down the semaphore, otherwise, after the daemon starts next time, the obsolete data in fcopy_transaction.message or fcopy_transaction.fcopy_msg will be used immediately. Cc: K. Y. Srinivasan k...@microsoft.com Signed-off-by: Dexuan Cui de...@microsoft.com --- drivers/hv/hv_fcopy.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/hv/hv_fcopy.c b/drivers/hv/hv_fcopy.c index 23b2ce2..177122a 100644 --- a/drivers/hv/hv_fcopy.c +++ b/drivers/hv/hv_fcopy.c @@ -86,6 +86,15 @@ static void fcopy_work_func(struct work_struct *dummy) * process the pending transaction. */ fcopy_respond_to_host(HV_E_FAIL); + + /* In the case the user-space daemon crashes, hangs or is killed, we + * need to down the semaphore, otherwise, after the daemon starts next + * time, the obsolete data in fcopy_transaction.message or + * fcopy_transaction.fcopy_msg will be used immediately. + */ + if (down_trylock(fcopy_transaction.read_sema)) + pr_debug(FCP: failed to acquire the semaphore\n); Why is FCP: needed? pr_debug() should never need any type of prefix. Please fix. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: octeon: Fix checkpatch warning
On Thu, Nov 27, 2014 at 12:35:23AM +, Luis de Bethencourt wrote: On Wed, Nov 26, 2014 at 01:45:23PM -0800, Greg KH wrote: On Tue, Nov 25, 2014 at 01:26:14PM +, Luis de Bethencourt wrote: This patch fixes the checkpatch.pl warnings: WARNING: line over 80 characters + int cores_in_use = core_state.baseline_cores - atomic_read(core_state.available_cores); WARNING: line over 80 characters + skb-data = skb-head + work-packet_ptr.s.addr - cvmx_ptr_to_phys(skb-head); Signed-off-by: Luis de Bethencourt l...@debethencourt.com --- drivers/staging/octeon/ethernet-rx.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c index 44e372f..bd83f55 100644 --- a/drivers/staging/octeon/ethernet-rx.c +++ b/drivers/staging/octeon/ethernet-rx.c @@ -295,7 +295,8 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) */ union cvmx_pow_wq_int_cntx counts; int backlog; - int cores_in_use = core_state.baseline_cores - atomic_read(core_state.available_cores); + int cores_in_use = core_state.baseline_cores - + atomic_read(core_state.available_cores); counts.u64 = cvmx_read_csr(CVMX_POW_WQ_INT_CNTX(pow_receive_group)); backlog = counts.s.iq_cnt + counts.s.ds_cnt; if (backlog budget * cores_in_use napi != NULL) @@ -324,7 +325,8 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) * buffer. */ if (likely(skb_in_hw)) { - skb-data = skb-head + work-packet_ptr.s.addr - cvmx_ptr_to_phys(skb-head); + skb-data = skb-head + work-packet_ptr.s.addr - + cvmx_ptr_to_phys(skb-head); prefetch(skb-data); skb-len = work-len; skb_set_tail_pointer(skb, skb-len); -- 2.1.3 No longer applies to my tree :( I'm confused. I just tried applying it to what I think is your tree is and it worked. https://git.kernel.org/cgit/linux/kernel/git/gregkh/staging.git/log/?h=staging-next Do I have this wrong? I'm applying patches first to staging-testing to get some 0-day buildbot testing before merging them to staging-next these days, as I've been burned with common problems too many times. I took some other octeon patches that were sent before yours were that caused the conflict. If you look at staging-testing right now you can see that. Hope this helps, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/2] mfd: rtsx: add func to split u32 into register
From: Micky Ching micky_ch...@realsil.com.cn Add helper function to write u32 to registers, if we want to put u32 value to 4 continuous register, this can help us reduce tedious work. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn --- include/linux/mfd/rtsx_pci.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h index 74346d5..bf45ea2 100644 --- a/include/linux/mfd/rtsx_pci.h +++ b/include/linux/mfd/rtsx_pci.h @@ -967,4 +967,19 @@ static inline u8 *rtsx_pci_get_cmd_data(struct rtsx_pcr *pcr) return (u8 *)(pcr-host_cmds_ptr); } +static inline void rtsx_pci_write_be32(struct rtsx_pcr *pcr, u16 reg, u32 val) +{ + rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg, 0xFF, val 24); + rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 1, 0xFF, val 16); + rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 2, 0xFF, val 8); + rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 3, 0xFF, val); +} + +static inline void rtsx_pci_write_le32(struct rtsx_pcr *pcr, u16 reg, u32 val) +{ + rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg, 0xFF, val); + rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 1, 0xFF, val 8); + rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 2, 0xFF, val 16); + rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 3, 0xFF, val 24); +} #endif -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/2] mmc: rtsx: add support for sdio card
From: Micky Ching micky_ch...@realsil.com.cn This patch is used to change transfer mode for sdio card support by SD interface. Micky Ching (2): mfd: rtsx: add func to split u32 into register mmc: rtsx: add support for sdio card drivers/mmc/host/rtsx_pci_sdmmc.c | 366 ++ include/linux/mfd/rtsx_pci.h | 15 ++ 2 files changed, 224 insertions(+), 157 deletions(-) -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: lustre: fix sparse warnings related to lock context imbalance
On Wed, Nov 26, 2014 at 12:54:43PM -0800, Greg KH wrote: Ugh, how horrid, please just delete these functions and push down the spin_lock/unlock calls down into the places these are called. Same for these. Same thing here. Hello Greg, Thanks for your comments, I will write a v2. -- Cheers, Loic ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH] hv: hv_fcopy: drop the obsolete message on transfer failure
-Original Message- From: Greg KH [mailto:gre...@linuxfoundation.org] Sent: Thursday, November 27, 2014 7:54 AM To: Dexuan Cui Cc: linux-ker...@vger.kernel.org; driverdev-devel@linuxdriverproject.org; o...@aepfle.de; a...@canonical.com; jasow...@redhat.com; KY Srinivasan; Haiyang Zhang; vkuzn...@redhat.com Subject: Re: [PATCH] hv: hv_fcopy: drop the obsolete message on transfer failure On Tue, Nov 11, 2014 at 09:03:26PM -0800, Dexuan Cui wrote: In the case the user-space daemon crashes, hangs or is killed, we need to down the semaphore, otherwise, after the daemon starts next time, the obsolete data in fcopy_transaction.message or fcopy_transaction.fcopy_msg will be used immediately. Cc: K. Y. Srinivasan k...@microsoft.com Signed-off-by: Dexuan Cui de...@microsoft.com --- drivers/hv/hv_fcopy.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/hv/hv_fcopy.c b/drivers/hv/hv_fcopy.c index 23b2ce2..177122a 100644 --- a/drivers/hv/hv_fcopy.c +++ b/drivers/hv/hv_fcopy.c @@ -86,6 +86,15 @@ static void fcopy_work_func(struct work_struct *dummy) * process the pending transaction. */ fcopy_respond_to_host(HV_E_FAIL); + + /* In the case the user-space daemon crashes, hangs or is killed, we +* need to down the semaphore, otherwise, after the daemon starts next +* time, the obsolete data in fcopy_transaction.message or +* fcopy_transaction.fcopy_msg will be used immediately. +*/ + if (down_trylock(fcopy_transaction.read_sema)) + pr_debug(FCP: failed to acquire the semaphore\n); Why is FCP: needed? pr_debug() should never need any type of prefix. Please fix. thanks, greg k-h Ok, I'll send a v2 soon. Thanks, -- Dexuan ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] hv: hv_fcopy: drop the obsolete message on transfer failure
In the case the user-space daemon crashes, hangs or is killed, we need to down the semaphore, otherwise, after the daemon starts next time, the obsolete data in fcopy_transaction.message or fcopy_transaction.fcopy_msg will be used immediately. Reviewed-by: Vitaly Kuznetsov vkuzn...@redhat.com Cc: K. Y. Srinivasan k...@microsoft.com Signed-off-by: Dexuan Cui de...@microsoft.com --- v2: I removed the FCP prefix as Greg asked. I also updated the output message a little: FCP: failed to acquire the semaphore -- can not acquire the semaphore: it is benign drivers/hv/hv_fcopy.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/hv/hv_fcopy.c b/drivers/hv/hv_fcopy.c index 23b2ce2..c518ad9 100644 --- a/drivers/hv/hv_fcopy.c +++ b/drivers/hv/hv_fcopy.c @@ -86,6 +86,15 @@ static void fcopy_work_func(struct work_struct *dummy) * process the pending transaction. */ fcopy_respond_to_host(HV_E_FAIL); + + /* In the case the user-space daemon crashes, hangs or is killed, we +* need to down the semaphore, otherwise, after the daemon starts next +* time, the obsolete data in fcopy_transaction.message or +* fcopy_transaction.fcopy_msg will be used immediately. +*/ + if (down_trylock(fcopy_transaction.read_sema)) + pr_debug(can not acquire the semaphore: it is benign\n); + } static int fcopy_handle_handshake(u32 version) -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2] hv: hv_fcopy: drop the obsolete message on transfer failure
- Original Message - In the case the user-space daemon crashes, hangs or is killed, we need to down the semaphore, otherwise, after the daemon starts next time, the obsolete data in fcopy_transaction.message or fcopy_transaction.fcopy_msg will be used immediately. Reviewed-by: Vitaly Kuznetsov vkuzn...@redhat.com Cc: K. Y. Srinivasan k...@microsoft.com Signed-off-by: Dexuan Cui de...@microsoft.com --- v2: I removed the FCP prefix as Greg asked. I also updated the output message a little: FCP: failed to acquire the semaphore -- can not acquire the semaphore: it is benign drivers/hv/hv_fcopy.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/hv/hv_fcopy.c b/drivers/hv/hv_fcopy.c index 23b2ce2..c518ad9 100644 --- a/drivers/hv/hv_fcopy.c +++ b/drivers/hv/hv_fcopy.c @@ -86,6 +86,15 @@ static void fcopy_work_func(struct work_struct *dummy) * process the pending transaction. */ fcopy_respond_to_host(HV_E_FAIL); + + /* In the case the user-space daemon crashes, hangs or is killed, we + * need to down the semaphore, otherwise, after the daemon starts next + * time, the obsolete data in fcopy_transaction.message or + * fcopy_transaction.fcopy_msg will be used immediately. + */ Looks still racy, what happens if the daemon start before down_trylock() but after fcopy_respont_to_host() here? + if (down_trylock(fcopy_transaction.read_sema)) + pr_debug(can not acquire the semaphore: it is benign\n); typo + } static int fcopy_handle_handshake(u32 version) -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel