[PATCH] ANDROID: binder: pr_err() strings should end with newlines

2017-09-24 Thread Arvind Yadav
Signed-off-by: Arvind Yadav 
---
 drivers/android/binder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index d055b3f..044b1c2 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -2192,7 +2192,7 @@ static void binder_transaction_buffer_release(struct 
binder_proc *proc,
 off_start,
 offp - off_start);
if (!parent) {
-   pr_err("transaction release %d bad parent 
offset",
+   pr_err("transaction release %d bad parent 
offset\n",
   debug_id);
continue;
}
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v1] staging: rtl8188eu: Fix spelling

2017-09-24 Thread Valentine Sinitsyn

Hi Tobin,

On 23.09.2017 01:23, Tobin C. Harding wrote:

Hi Valentine,

I can't quite work out the email threading of this patch. My guess is that if I 
cannot work it out
it might get missed by Greg.

Is this a new patch that you made by squashing the three patches previously 
submitted into one? If

Yes.


so, my suggestion would be to respond to this patch yourself with 'please drop 
this patch' (this lets
maintainers know to not worry further with it). Then submit the patch again 
without the
'In-Reply-To' header i.e send the patch with `git send-email`. You don't need 
v1 in the subject for
version 1, that is implicit.
OK, this makes sense, thank you. However I think Greg has already added 
the patch to staging-next, so this time it caused no confusion. I'll 
keep this procedure in mind for future submissions though.


Valentine



On Thu, Sep 14, 2017 at 06:34:20PM -0700, Valentine Sinitsyn wrote:

rtl8188eu contains some spelling errors in comment lines as well as in
constants. Harmless as they are, they still make the code feel a bit
unclean, which is not something we want in the kernel.


Nice description.


Improve this by fixing typos so they won't catch eyes of future driver
developers anymore.


This would be better in imperative mood i.e "Fix typos so they won't catch the 
eyes of future
developers."


Signed-off-by: Wolfgang Hartmann 
Signed-off-by: Manish Shrestha 
Signed-off-by: Valentine Sinitsyn 


  Reviewed-by: Tobin C. Harding 


---
  drivers/staging/rtl8188eu/core/rtw_efuse.c| 2 +-
  drivers/staging/rtl8188eu/core/rtw_mlme.c | 2 +-
  drivers/staging/rtl8188eu/hal/odm_HWConfig.c  | 4 ++--
  drivers/staging/rtl8188eu/include/odm.h   | 2 +-
  drivers/staging/rtl8188eu/include/rtl8188e_spec.h | 4 ++--
  5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c 
b/drivers/staging/rtl8188eu/core/rtw_efuse.c
index b9bdff0..2c4c8c4 100644
--- a/drivers/staging/rtl8188eu/core/rtw_efuse.c
+++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c
@@ -48,7 +48,7 @@ void Efuse_PowerSwitch(
if (PwrState) {
usb_write8(pAdapter, REG_EFUSE_ACCESS, EFUSE_ACCESS_ON);
  
-		/*  1.2V Power: From VDDON with Power Cut(0xh[15]), defualt valid */

+   /*  1.2V Power: From VDDON with Power Cut(0xh[15]), default 
valid */
tmpV16 = usb_read16(pAdapter, REG_SYS_ISO_CTRL);
if (!(tmpV16 & PWC_EV12V)) {
tmpV16 |= PWC_EV12V;
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c 
b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index f663e6c..0d2381d 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -1329,7 +1329,7 @@ void rtw_cpwm_event_callback(struct adapter *padapter, u8 
*pbuf)
  }
  
  /*

- * _rtw_join_timeout_handler - Timeout/faliure handler for CMD JoinBss
+ * _rtw_join_timeout_handler - Timeout/failure handler for CMD JoinBss
   * @adapter: pointer to struct adapter structure
   */
  void _rtw_join_timeout_handler (unsigned long data)
diff --git a/drivers/staging/rtl8188eu/hal/odm_HWConfig.c 
b/drivers/staging/rtl8188eu/hal/odm_HWConfig.c
index 0555e42..5fcbe56 100644
--- a/drivers/staging/rtl8188eu/hal/odm_HWConfig.c
+++ b/drivers/staging/rtl8188eu/hal/odm_HWConfig.c
@@ -109,7 +109,7 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct 
odm_dm_struct *dm_odm,
  
  		dm_odm->PhyDbgInfo.NumQryPhyStatusCCK++;

/*  (1)Hardware does not provide RSSI for CCK */
-   /*  (2)PWDB, Average PWDB cacluated by hardware (for rate 
adaptive) */
+   /*  (2)PWDB, Average PWDB calculated by hardware (for rate 
adaptive) */
  
  		cck_highpwr = dm_odm->bCckHighPower;
  
@@ -223,7 +223,7 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm,

pPhyInfo->RxSNR[i] = (s32)(pPhyStaRpt->path_rxsnr[i]/2);
dm_odm->PhyDbgInfo.RxSNRdB[i] = 
(s32)(pPhyStaRpt->path_rxsnr[i]/2);
}
-   /*  (2)PWDB, Average PWDB cacluated by hardware (for rate 
adaptive) */
+   /*  (2)PWDB, Average PWDB calculated by hardware (for rate 
adaptive) */
rx_pwr_all = (((pPhyStaRpt->cck_sig_qual_ofdm_pwdb_all) >> 1) & 
0x7f) - 110;
  
  		PWDB_ALL = odm_QueryRxPwrPercentage(rx_pwr_all);

diff --git a/drivers/staging/rtl8188eu/include/odm.h 
b/drivers/staging/rtl8188eu/include/odm.h
index 4fb3bb0..50e2673 100644
--- a/drivers/staging/rtl8188eu/include/odm.h
+++ b/drivers/staging/rtl8188eu/include/odm.h
@@ -478,7 +478,7 @@ enum odm_operation_mode {
  
  /*  ODM_CMNINFO_WM_MODE */

  enum odm_wireless_mode {
-   ODM_WM_UNKNOW   = 0x0,
+   ODM_WM_UNKNOWN  = 0x0,
ODM_WM_B= BIT(0),
ODM_WM_G= BIT(1),
ODM_WM_A= BIT(2),
diff --git a/drivers/staging/rtl8188eu/include/rtl8188e_spec.h 
b/drivers/staging/rtl8188eu/include/rtl8188e_spec.h

Re: [PATCH v2 resend] staging: bcm2835-audio: Fix memory corruption

2017-09-24 Thread Stefan Wahren
> Phil Elwell  hat am 24. September 2017 um 16:20 
> geschrieben:
> 
> 
> The previous commit (0adbfd46) fixed a memory leak but also freed a
> block in the success case, causing a stale pointer to be used with
> potentially fatal results. Only free the vchi_instance block in the
> case that vchi_connect fails; once connected, the instance is
> retained for subsequent connections.
> 
> Simplifying the code by removing a bunch of gotos and returning errors
> directly.
> 
> Signed-off-by: Phil Elwell 
> Fixes: 0adbfd4694c2 ("staging: bcm2835-audio: fix memory leak in 
> bcm2835_audio_open_connection()")

Tested-by: Stefan Wahren 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2] staging: atomisp: add a driver for ov5648 camera sensor

2017-09-24 Thread Devid Antonio Floni
The ov5648 5-megapixel camera sensor from OmniVision supports up to 2592x1944
resolution and MIPI CSI-2 interface. Output format is raw sRGB/Bayer with
10 bits per colour (SGRBG10_1X10).

This patch is a port of ov5648 driver after applying following
01org/ProductionKernelQuilts patches:
 - 0004-ov2680-ov5648-Fork-lift-source-from-CTS.patch
 - 0005-ov2680-ov5648-gminification.patch
 - 0006-ov5648-Focus-support.patch
 - 0007-Fix-resolution-issues-on-rear-camera.patch
 - 0008-ov2680-ov5648-Enabled-the-set_exposure-functions.patch
 - 0010-IRDA-cameras-mode-list-cleanup-unification.patch
 - 0012-ov5648-Add-1296x972-binned-mode.patch
 - 0014-ov5648-Adapt-to-Atomisp2-Gmin-VCM-framework.patch
 - 0015-dw9714-Gmin-Atomisp-specific-VCM-driver.patch
 - 0017-ov5648-Fix-deadlock-on-I2C-error.patch
 - 0018-gc2155-Fix-deadlock-on-error.patch
 - 0019-ov5648-Add-1280x960-binned-mode.patch
 - 0020-ov5648-Make-1280x960-as-default-video-resolution.patch
 - 0021-MALATA-Fix-testCameraToSurfaceTextureMetadata-CTS.patch
 - 0023-OV5648-Added-5MP-video-resolution.patch

New changes introduced during the port:
 - Rename entity types to entity functions
 - Replace v4l2_subdev_fh by v4l2_subdev_pad_config
 - Make use of media_bus_format enum
 - Rename media_entity_init function to media_entity_pads_init
 - Replace try_mbus_fmt by set_fmt
 - Replace s_mbus_fmt by set_fmt
 - Replace g_mbus_fmt by get_fmt
 - Use s_ctrl/g_volatile_ctrl instead of ctrl core ops
 - Update gmin platform API path
 - Constify acpi_device_id
 - Add "INT5648" value to acpi_device_id
 - Fix some checkpatch errors and warnings
 - Remove FSF's mailing address from the sample GPL notice

Changes in v2:
 - Fix indentation
 - Add atomisp prefix to Kconfig option

"INT5648" ACPI device id can be found in following production hardware:
BIOS Information
Vendor: LENOVO
Version: 1HCN40WW
Release Date: 11/04/2016
...
BIOS Revision: 0.40
Firmware Revision: 0.0
...
System Information
Manufacturer: LENOVO
Product Name: 80SG
Version: MIIX 310-10ICR
...
SKU Number: LENOVO_MT_80SG_BU_idea_FM_MIIX 310-10ICR
Family: IDEAPAD
...

Device DSDT excerpt:
Device (CA00)
{
Name (_ADR, Zero)  // _ADR: Address
Name (_HID, "INT5648")  // _HID: Hardware ID
Name (_CID, "INT5648")  // _CID: Compatible ID
Name (_SUB, "INTL")  // _SUB: Subsystem ID
Name (_DDN, "ov5648")  // _DDN: DOS Device Name
...

I was not able to properly test this patch on my Lenovo Miix 310 due to other
issues with atomisp, the output is the same as ov2680 driver (OVTI2680)
which is very similar.

Signed-off-by: Devid Antonio Floni 
---
 drivers/staging/media/atomisp/i2c/Kconfig  |   11 +
 drivers/staging/media/atomisp/i2c/Makefile |1 +
 drivers/staging/media/atomisp/i2c/atomisp-ov5648.c | 1867 
 drivers/staging/media/atomisp/i2c/ov5648.h |  835 +
 4 files changed, 2714 insertions(+)
 create mode 100644 drivers/staging/media/atomisp/i2c/atomisp-ov5648.c
 create mode 100644 drivers/staging/media/atomisp/i2c/ov5648.h

diff --git a/drivers/staging/media/atomisp/i2c/Kconfig 
b/drivers/staging/media/atomisp/i2c/Kconfig
index 09b1a97..87032ff 100644
--- a/drivers/staging/media/atomisp/i2c/Kconfig
+++ b/drivers/staging/media/atomisp/i2c/Kconfig
@@ -89,6 +89,17 @@ config VIDEO_ATOMISP_OV2680
 
 It currently only works with the atomisp driver.
 
+config VIDEO_ATOMISP_OV5648
+   tristate "Omnivision OV5648 sensor support"
+   depends on I2C && VIDEO_V4L2
+   ---help---
+This is a Video4Linux2 sensor-level driver for the Omnivision
+OV5648 raw camera.
+
+ov5648 is a 5M raw sensor.
+
+It currently only works with the atomisp driver.
+
 #
 # Kconfig for flash drivers
 #
diff --git a/drivers/staging/media/atomisp/i2c/Makefile 
b/drivers/staging/media/atomisp/i2c/Makefile
index 3d27c75..f9fcaef 100644
--- a/drivers/staging/media/atomisp/i2c/Makefile
+++ b/drivers/staging/media/atomisp/i2c/Makefile
@@ -8,6 +8,7 @@ obj-$(CONFIG_VIDEO_ATOMISP_MT9M114)+= atomisp-mt9m114.o
 obj-$(CONFIG_VIDEO_ATOMISP_GC2235) += atomisp-gc2235.o
 obj-$(CONFIG_VIDEO_ATOMISP_OV2722) += atomisp-ov2722.o
 obj-$(CONFIG_VIDEO_ATOMISP_OV2680) += atomisp-ov2680.o
+obj-$(CONFIG_VIDEO_ATOMISP_OV5648) += atomisp-ov5648.o
 obj-$(CONFIG_VIDEO_ATOMISP_GC0310) += atomisp-gc0310.o
 
 obj-$(CONFIG_VIDEO_ATOMISP_MSRLIST_HELPER) += atomisp-libmsrlisthelper.o
diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov5648.c 
b/drivers/staging/media/atomisp/i2c/atomisp-ov5648.c
new file mode 100644
index 000..694698c
--- /dev/null
+++ b/drivers/staging/media/atomisp/i2c/atomisp-ov5648.c
@@ -0,0 +1,1867 @@
+/*
+ * Support for OmniVision OV5648 5M camera sensor.
+ * Based on OmniVision OV2722 driver.
+ *
+ * Copyright (c) 2013 Intel Corporation. All Rights Reserved.
+ *
+ * This program 

[PATCH v2 resend] staging: bcm2835-audio: Fix memory corruption

2017-09-24 Thread Phil Elwell
The previous commit (0adbfd46) fixed a memory leak but also freed a
block in the success case, causing a stale pointer to be used with
potentially fatal results. Only free the vchi_instance block in the
case that vchi_connect fails; once connected, the instance is
retained for subsequent connections.

Simplifying the code by removing a bunch of gotos and returning errors
directly.

Signed-off-by: Phil Elwell 
Fixes: 0adbfd4694c2 ("staging: bcm2835-audio: fix memory leak in 
bcm2835_audio_open_connection()")
---
v2: Simplified following feedback from Dan Carpenter.
---
 .../vc04_services/bcm2835-audio/bcm2835-vchiq.c   | 19 +++
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c 
b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
index 5f3d8f2..4be864d 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
@@ -390,8 +390,7 @@ static int bcm2835_audio_open_connection(struct 
bcm2835_alsa_stream *alsa_stream
__func__, instance);
instance->alsa_stream = alsa_stream;
alsa_stream->instance = instance;
-   ret = 0; // xxx todo -1;
-   goto err_free_mem;
+   return 0;
}
 
/* Initialize and create a VCHI connection */
@@ -401,16 +400,15 @@ static int bcm2835_audio_open_connection(struct 
bcm2835_alsa_stream *alsa_stream
LOG_ERR("%s: failed to initialise VCHI instance 
(ret=%d)\n",
__func__, ret);
 
-   ret = -EIO;
-   goto err_free_mem;
+   return -EIO;
}
ret = vchi_connect(NULL, 0, vchi_instance);
if (ret) {
LOG_ERR("%s: failed to connect VCHI instance 
(ret=%d)\n",
__func__, ret);
 
-   ret = -EIO;
-   goto err_free_mem;
+   kfree(vchi_instance);
+   return -EIO;
}
initted = 1;
}
@@ -421,19 +419,16 @@ static int bcm2835_audio_open_connection(struct 
bcm2835_alsa_stream *alsa_stream
if (IS_ERR(instance)) {
LOG_ERR("%s: failed to initialize audio service\n", __func__);
 
-   ret = PTR_ERR(instance);
-   goto err_free_mem;
+   /* vchi_instance is retained for use the next time. */
+   return PTR_ERR(instance);
}
 
instance->alsa_stream = alsa_stream;
alsa_stream->instance = instance;
 
LOG_DBG(" success !\n");
-   ret = 0;
-err_free_mem:
-   kfree(vchi_instance);
 
-   return ret;
+   return 0;
 }
 
 int bcm2835_audio_open(struct bcm2835_alsa_stream *alsa_stream)
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging:ccree Fix avoid externs in .c files

2017-09-24 Thread Gilad Ben-Yossef
On Thu, Sep 21, 2017 at 9:43 AM, Janani Sankara Babu
 wrote:
> This patch solves the warning shown by the checkpatch script
> WARNING: externs should be avoided in .c files

I'm afraid here too the feedback is the same - you are working on the
Linus master tree, therefore you are seeing
things that are already gone from the downstream staging tree.


Thanks,
Gilad


-- 
Gilad Ben-Yossef
Chief Coffee Drinker

"If you take a class in large-scale robotics, can you end up in a
situation where the homework eats your dog?"
 -- Jean-Baptiste Queru
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging:ccree Fix use BIT macro

2017-09-24 Thread Gilad Ben-Yossef
Hi Janani,

On Thu, Sep 21, 2017 at 9:39 AM, Janani Sankara Babu
 wrote:
> This patch is created to solve the following warning shown by the checkpatch
> script Warning: Replace all occurences of (1<
> Signed-off-by: Janani Sankara Babu 

Thank you for the patch - unfortunately, such a fix s already present
in the staging-next tree.

I suggest you base your patches to ccree on that tree as it is the
most current for this driver.

Thanks again,
Gilad


-- 
Gilad Ben-Yossef
Chief Coffee Drinker

"If you take a class in large-scale robotics, can you end up in a
situation where the homework eats your dog?"
 -- Jean-Baptiste Queru
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel