[PATCH 00/35] treewide trivial patches converting pr_warning to pr_warn

2017-02-16 Thread Joe Perches
There are ~4300 uses of pr_warn and ~250 uses of the older pr_warning in the kernel source tree. Make the use of pr_warn consistent across all kernel files. This excludes all files in tools/ as there is a separate define pr_warning for that directory tree and pr_warn is not used in tools/. Done

[PATCH 22/35] drivers/media: Convert remaining use of pr_warning to pr_warn

2017-02-16 Thread Joe Perches
To enable eventual removal of pr_warning This makes pr_warn use consistent for drivers/media Prior to this patch, there was 1 use of pr_warning and 310 uses of pr_warn in drivers/media Signed-off-by: Joe Perches --- drivers/media/platform/sh_vou.c | 4 ++-- 1 file changed, 2 insertions(+), 2 d

cron job: media_tree daily build: WARNINGS

2017-02-16 Thread Hans Verkuil
This message is generated daily by a cron job that builds media_tree for the kernels and architectures in the list below. Results of the daily build of media_tree: date: Fri Feb 17 05:00:18 CET 2017 media-tree git hash:9eeb0ed0f30938f31a3d9135a88b9502192c18dd media_build git

Dead code in v4l2-mem2mem.c?

2017-02-16 Thread Shaobo
Hi there, My name is Shaobo He and I am a graduate student at University of Utah. I am applying a static analysis tool to the Linux device drivers, looking for NULL pointer dereference and accidentally found a plausible dead code location in v4l2-mem2mem.c due to undefined behavior. The foll

Re: [PATCH 00/15] Exynos MFC v6+ - remove the need for the reserved memory

2017-02-16 Thread Nicolas Dufresne
Le mardi 14 février 2017 à 08:51 +0100, Marek Szyprowski a écrit : > Dear All, > > This patchset is a result of my work on enabling full support for MFC device > (multimedia codec) on Exynos 5433 on ARM64 architecture. Initially I thought > that to let it working on ARM64 architecture with IOMMU,

Re: [PATCH v4 18/36] media: Add i.MX media core driver

2017-02-16 Thread Steve Longerbeam
On 02/16/2017 05:02 AM, Philipp Zabel wrote: On Wed, 2017-02-15 at 18:19 -0800, Steve Longerbeam wrote: + +- Clean up and move the ov5642 subdev driver to drivers/media/i2c, and + create the binding docs for it. This is done already, right? I cleaned up ov5640 and moved it to drivers/m

Re: [PATCH v4 07/36] ARM: dts: imx6-sabresd: add OV5642 and OV5640 camera sensors

2017-02-16 Thread Steve Longerbeam
On 02/16/2017 04:51 PM, Fabio Estevam wrote: Hi Steve, On Thu, Feb 16, 2017 at 12:19 AM, Steve Longerbeam wrote: Enables the OV5642 parallel-bus sensor, and the OV5640 MIPI CSI-2 sensor. The OV5642 connects to the parallel-bus mux input port on ipu1_csi0_mux. The OV5640 connects to the inp

[PATCH v3 1/3] [media] si2157: Add support for Si2141-A10

2017-02-16 Thread Stefan Brüns
The Si2141 needs two distinct commands for powerup/reset, otherwise it will not respond to chip revision requests. It also needs a firmware to run properly. Signed-off-by: Stefan Brüns --- drivers/media/tuners/si2157.c | 23 +-- drivers/media/tuners/si2157_priv.h | 2 ++

[PATCH v3 3/3] [media] dvbsky: MyGica T230C support

2017-02-16 Thread Stefan Brüns
Mygica T230 DVB-T/T2/C USB stick support. It uses the same FX2/Si2168 bridge/demodulator combo as the other devices supported by the driver, but uses the Si2141 tuner. Several DVB-T (MPEG2) and DVB-T2 (H.265) channels were tested, as well as the included remote control. Signed-off-by: Stefan Brüns

[PATCH v3 0/3] Add support for MyGica T230C DVB-T2 stick

2017-02-16 Thread Stefan Brüns
The required command sequence for the new tuner (Si2141) was traced from the current Windows driver and verified with a small python script/libusb. The changes to the Si2168 and dvbsky driver are mostly additions of the required IDs and some glue code. Stefan Brüns (3): [media] si2157: Add suppo

[PATCH v3 2/3] [media] si2168: add support for Si2168-D60

2017-02-16 Thread Stefan Brüns
Add handling for new revision, requiring new firmware. Signed-off-by: Stefan Brüns --- drivers/media/dvb-frontends/si2168.c | 4 drivers/media/dvb-frontends/si2168_priv.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-fr

Re: [PATCH v4 07/36] ARM: dts: imx6-sabresd: add OV5642 and OV5640 camera sensors

2017-02-16 Thread Fabio Estevam
Hi Steve, On Thu, Feb 16, 2017 at 12:19 AM, Steve Longerbeam wrote: > Enables the OV5642 parallel-bus sensor, and the OV5640 MIPI CSI-2 sensor. > > The OV5642 connects to the parallel-bus mux input port on ipu1_csi0_mux. > > The OV5640 connects to the input port on the MIPI CSI-2 receiver on > mi

Re: [PATCH v4 00/36] i.MX Media Driver

2017-02-16 Thread Russell King - ARM Linux
On Thu, Feb 16, 2017 at 02:27:41PM -0800, Steve Longerbeam wrote: > > > On 02/16/2017 02:20 PM, Russell King - ARM Linux wrote: > >On Wed, Feb 15, 2017 at 06:19:02PM -0800, Steve Longerbeam wrote: > >>In version 4: > > > >With this version, I get: > > > >[28762.892053] imx6-mipi-csi2: LP-11 timeo

Re: [PATCH v4 00/36] i.MX Media Driver

2017-02-16 Thread Steve Longerbeam
On 02/16/2017 02:20 PM, Russell King - ARM Linux wrote: On Wed, Feb 15, 2017 at 06:19:02PM -0800, Steve Longerbeam wrote: In version 4: With this version, I get: [28762.892053] imx6-mipi-csi2: LP-11 timeout, phy_state = 0x [28762.899409] ipu1_csi0: pipeline_set_stream failed with -1

Re: [PATCH v4 00/36] i.MX Media Driver

2017-02-16 Thread Russell King - ARM Linux
On Wed, Feb 15, 2017 at 06:19:02PM -0800, Steve Longerbeam wrote: > In version 4: With this version, I get: [28762.892053] imx6-mipi-csi2: LP-11 timeout, phy_state = 0x [28762.899409] ipu1_csi0: pipeline_set_stream failed with -110 -- RMK's Patch system: http://www.armlinux.org.uk/devel

Re: [PATCH 2/4] [media] em28xx: reduce stack usage in probe functions

2017-02-16 Thread Frank Schäfer
Hi Arnd, Am 13.02.2017 um 15:00 schrieb Hans Verkuil: Hi Arnd, I'll take the others of this patch series, but will postpone this one until it has been tested. I've asked Frank to see if he can test it, if not, then it will have to wait until March when I have access to an omnivision-em28xx d

Re: [PATCH v4 01/36] [media] dt-bindings: Add bindings for i.MX media driver

2017-02-16 Thread Steve Longerbeam
On 02/16/2017 03:54 AM, Philipp Zabel wrote: On Wed, 2017-02-15 at 18:19 -0800, Steve Longerbeam wrote: Add bindings documentation for the i.MX media driver. Signed-off-by: Steve Longerbeam --- Documentation/devicetree/bindings/media/imx.txt | 66 + 1 file changed, 6

Re: [PATCH v4 20/36] media: imx: Add CSI subdev driver

2017-02-16 Thread Russell King - ARM Linux
On Thu, Feb 16, 2017 at 10:44:16AM -0800, Steve Longerbeam wrote: > On 02/16/2017 04:40 AM, Russell King - ARM Linux wrote: > >[8.012191] imx_media_common: module is from the staging directory, the > >quality is unknown, you have been warned. > >[8.018175] imx_media: module is from the sta

Re: [PATCH v4 20/36] media: imx: Add CSI subdev driver

2017-02-16 Thread Steve Longerbeam
On 02/16/2017 06:20 AM, Russell King - ARM Linux wrote: On Thu, Feb 16, 2017 at 01:09:35PM +, Russell King - ARM Linux wrote: More crap. If the "complete" method fails (or, in fact, anything in v4l2_async_test_notify() fails) then all hell breaks loose, because of the total lack of clea

Re: [PATCH v4 20/36] media: imx: Add CSI subdev driver

2017-02-16 Thread Steve Longerbeam
On 02/16/2017 04:40 AM, Russell King - ARM Linux wrote: On Thu, Feb 16, 2017 at 11:52:06AM +, Russell King - ARM Linux wrote: On Wed, Feb 15, 2017 at 06:19:22PM -0800, Steve Longerbeam wrote: +static const struct platform_device_id imx_csi_ids[] = { + { .name = "imx-ipuv3-csi" }, +

Re: [PATCH v4 00/36] i.MX Media Driver

2017-02-16 Thread Steve Longerbeam
On 02/16/2017 03:37 AM, Russell King - ARM Linux wrote: Two problems. On Wed, Feb 15, 2017 at 06:19:02PM -0800, Steve Longerbeam wrote: media: imx: propagate sink pad formats to source pads 1) It looks like all cases aren't being caught: - entity 74: ipu1_csi0 (3 pads, 4 links)

Re: [PATCH v4 36/36] media: imx: propagate sink pad formats to source pads

2017-02-16 Thread Steve Longerbeam
On 02/16/2017 03:29 AM, Philipp Zabel wrote: On Wed, 2017-02-15 at 18:19 -0800, Steve Longerbeam wrote: [...] diff --git a/drivers/staging/media/imx/imx-ic-prpencvf.c b/drivers/staging/media/imx/imx-ic-prpencvf.c index dd9d499..c43f85f 100644 --- a/drivers/staging/media/imx/imx-ic-prpencvf.c

Re: [PATCH v4 28/36] media: imx: csi: fix crop rectangle changes in set_fmt

2017-02-16 Thread Steve Longerbeam
On 02/16/2017 03:05 AM, Russell King - ARM Linux wrote: On Wed, Feb 15, 2017 at 06:19:30PM -0800, Steve Longerbeam wrote: diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c index ae24b42..3cb97e2 100644 --- a/drivers/staging/media/imx/imx-media-

Re: [PATCH v4 23/36] media: imx: Add MIPI CSI-2 Receiver subdev driver

2017-02-16 Thread Steve Longerbeam
On 02/16/2017 02:28 AM, Russell King - ARM Linux wrote: On Wed, Feb 15, 2017 at 06:19:25PM -0800, Steve Longerbeam wrote: Adds MIPI CSI-2 Receiver subdev driver. This subdev is required for sensors with a MIPI CSI2 interface. Signed-off-by: Steve Longerbeam Just like I reported on the 30th

[PATCH] media: vpif: use a configurable i2c_adapter_id for vpif display

2017-02-16 Thread Bartosz Golaszewski
The vpif display driver uses a static i2c adapter ID of 1 but on the da850-evm board in DT boot mode the i2c adapter ID is actually 0. Make the adapter ID configurable like it already is for vpif capture. Signed-off-by: Bartosz Golaszewski Acked-by: Kevin Hilman --- arch/arm/mach-davinci/board

[GIT PULL for v4.10] media fixes

2017-02-16 Thread Mauro Carvalho Chehab
Hi Linus, Please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media tags/media/v4.10-5 >From a regression fix that makes the Siano driver to work again after the CONFIG_VMAP_STACK change. Regards, Mauro The following changes since commit 42980da2eb7eb9695d8efc0c0ef1

Re: [PATCH v4 18/36] media: Add i.MX media core driver

2017-02-16 Thread Steve Longerbeam
On 02/16/2017 02:27 AM, Russell King - ARM Linux wrote: On Wed, Feb 15, 2017 at 06:19:20PM -0800, Steve Longerbeam wrote: Add the core media driver for i.MX SOC. Signed-off-by: Steve Longerbeam Just as I reported on the 30th January: Applying: media: Add i.MX media core driver .git/rebase-

Re: [PATCH 00/10] ARM: davinci: add vpif display support

2017-02-16 Thread Bartosz Golaszewski
2017-02-13 10:22 GMT+01:00 Sekhar Nori : > Hi Bartosz, > > On Tuesday 07 February 2017 10:11 PM, Bartosz Golaszewski wrote: >> The following series adds support for v4l2 display on da850-evm with >> a UI board in device tree boot mode. >> >> Patches 1/10 - 5/10 deal with the device tree: we fix whi

Re: [PATCH 03/10] media: dt-bindings: vpif: extend the example with an output port

2017-02-16 Thread Bartosz Golaszewski
2017-02-15 23:08 GMT+01:00 Rob Herring : > On Tue, Feb 07, 2017 at 05:41:16PM +0100, Bartosz Golaszewski wrote: >> This makes the example more or less correspond with the da850-evm >> hardware setup. >> >> Signed-off-by: Bartosz Golaszewski >> --- >> .../devicetree/bindings/media/ti,da850-vpif.tx

Re: [PATCH v4 20/36] media: imx: Add CSI subdev driver

2017-02-16 Thread Russell King - ARM Linux
On Thu, Feb 16, 2017 at 01:09:35PM +, Russell King - ARM Linux wrote: > On Thu, Feb 16, 2017 at 12:40:27PM +, Russell King - ARM Linux wrote: > > However, the following is primerily directed at Laurent as the one who > > introduced the BUG_ON() in question... > > > > NEVER EVER USE BUG_ON(

Re: [PATCH v4 18/36] media: Add i.MX media core driver

2017-02-16 Thread Russell King - ARM Linux
On Thu, Feb 16, 2017 at 02:02:03PM +0100, Philipp Zabel wrote: > On Wed, 2017-02-15 at 18:19 -0800, Steve Longerbeam wrote: > > +- imx-csi subdev is not being autoloaded as a kernel module, probably > > + because ipu_add_client_devices() does not register the IPU client > > + platform devices, bu

Re: [PATCH v4 20/36] media: imx: Add CSI subdev driver

2017-02-16 Thread Russell King - ARM Linux
On Thu, Feb 16, 2017 at 12:40:27PM +, Russell King - ARM Linux wrote: > However, the following is primerily directed at Laurent as the one who > introduced the BUG_ON() in question... > > NEVER EVER USE BUG_ON() IN A PATH THAT CAN RETURN AN ERROR. > > It's possible to find Linus rants about t

Fwd: [regression] dvb_usb_cxusb (was Re: ir-keytable: infinite loops, segfaults)

2017-02-16 Thread Vincent McIntyre
Hi list I missed you in the cc: field... -- Forwarded message -- From: Vincent McIntyre Date: Thu, 16 Feb 2017 23:51:05 +1100 Subject: Re: [regression] dvb_usb_cxusb (was Re: ir-keytable: infinite loops, segfaults) To: Sean Young On 2/16/17, Sean Young wrote: > > The problem i

Re: ir-keytable: infinite loops, segfaults

2017-02-16 Thread Vincent McIntyre
The dmesg... dmesg.txt.gz Description: GNU Zip compressed data

Re: ir-keytable: infinite loops, segfaults

2017-02-16 Thread Vincent McIntyre
Hi again after you kindly fixed media_build for me I applied the nec protocol patch and tried again. $ sudo ir-keytable Found /sys/class/rc/rc0/ (/dev/input/event5) with: Driver imon, table rc-imon-mce Supported protocols: rc-6 Enabled protocols: rc-6 Name: iMON Re

Re: [PATCH v4 18/36] media: Add i.MX media core driver

2017-02-16 Thread Philipp Zabel
On Wed, 2017-02-15 at 18:19 -0800, Steve Longerbeam wrote: > Add the core media driver for i.MX SOC. > > Signed-off-by: Steve Longerbeam > --- > Documentation/media/v4l-drivers/imx.rst | 542 + > drivers/staging/media/Kconfig | 2 + > drivers/stagi

Re: [PATCH v4 20/36] media: imx: Add CSI subdev driver

2017-02-16 Thread Russell King - ARM Linux
On Thu, Feb 16, 2017 at 11:52:06AM +, Russell King - ARM Linux wrote: > On Wed, Feb 15, 2017 at 06:19:22PM -0800, Steve Longerbeam wrote: > > +static const struct platform_device_id imx_csi_ids[] = { > > + { .name = "imx-ipuv3-csi" }, > > + { }, > > +}; > > +MODULE_DEVICE_TABLE(platform, im

Re:[報價]19V,4A 電源適配器(變壓器) 大量需求

2017-02-16 Thread GME
來信已收到, 早安~ 採購人員你好: 我司專門生產交換式電源供應器、USB充電器、POE供電, 全球眾多知名公司都是我們長期合作的客戶, 例如PHILIPS、HP、TOSHIBA、LITEON…等, 我們擁有各國眾多安規認證, 還有提供專業 ODM、OEM 服務 我們公司位於台中,歡迎來坐坐, 誠摯的希望與您合作。 期待你的回覆,將不勝感激。 吉密科技 林榮宗 0422587996 gme.po...@msa.hinet.net 如寄錯請轉交,謝謝

Re: [patch] staging: bcm2835-camera: free first element in array

2017-02-16 Thread Dan Carpenter
On Wed, Feb 15, 2017 at 01:47:55PM +0100, walter harms wrote: > > > Am 15.02.2017 13:25, schrieb Dan Carpenter: > > We should free gdev[0] so the > should be >=. > > > > Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera > > driver.") > > Signed-off-by: Dan Carpenter > >

Re: [PATCH v4 01/36] [media] dt-bindings: Add bindings for i.MX media driver

2017-02-16 Thread Philipp Zabel
On Wed, 2017-02-15 at 18:19 -0800, Steve Longerbeam wrote: > Add bindings documentation for the i.MX media driver. > > Signed-off-by: Steve Longerbeam > --- > Documentation/devicetree/bindings/media/imx.txt | 66 > + > 1 file changed, 66 insertions(+) > create mode 1006

Re: [PATCH v4 20/36] media: imx: Add CSI subdev driver

2017-02-16 Thread Russell King - ARM Linux
On Wed, Feb 15, 2017 at 06:19:22PM -0800, Steve Longerbeam wrote: > +static const struct platform_device_id imx_csi_ids[] = { > + { .name = "imx-ipuv3-csi" }, > + { }, > +}; > +MODULE_DEVICE_TABLE(platform, imx_csi_ids); > + > +static struct platform_driver imx_csi_driver = { > + .probe

Re: [PATCH v4 00/36] i.MX Media Driver

2017-02-16 Thread Russell King - ARM Linux
Two problems. On Wed, Feb 15, 2017 at 06:19:02PM -0800, Steve Longerbeam wrote: > media: imx: propagate sink pad formats to source pads 1) It looks like all cases aren't being caught: - entity 74: ipu1_csi0 (3 pads, 4 links) type V4L2 subdev subtype Unknown flags 0 de

Re: [PATCH v4 17/36] media: Add userspace header file for i.MX

2017-02-16 Thread Philipp Zabel
On Wed, 2017-02-15 at 18:19 -0800, Steve Longerbeam wrote: > This adds a header file for use by userspace programs wanting to interact > with the i.MX media driver. It defines custom v4l2 controls and events > generated by the i.MX v4l2 subdevices. > > Signed-off-by: Steve Longerbeam > --- > inc

Re: [PATCH v4 33/36] media: imx: redo pixel format enumeration and negotiation

2017-02-16 Thread Philipp Zabel
On Wed, 2017-02-15 at 18:19 -0800, Steve Longerbeam wrote: > The previous API and negotiation of mbus codes and pixel formats > was broken, and has been completely redone. > > The negotiation of media bus codes should be as follows: > > CSI: > > sink pad direct src pad IDMAC src pad > -

Re: [PATCH v4 30/36] media: imx: update capture dev format on IDMAC output pad set_fmt

2017-02-16 Thread Philipp Zabel
On Wed, 2017-02-15 at 18:19 -0800, Steve Longerbeam wrote: > When configuring the IDMAC output pad formats (in ipu_csi, > ipu_ic_prpenc, and ipu_ic_prpvf subdevs), the attached capture > device format must also be updated. > > Signed-off-by: Steve Longerbeam > Suggested-by: Philipp Zabel > --- >

Re: [PATCH v4 36/36] media: imx: propagate sink pad formats to source pads

2017-02-16 Thread Philipp Zabel
On Wed, 2017-02-15 at 18:19 -0800, Steve Longerbeam wrote: [...] > diff --git a/drivers/staging/media/imx/imx-ic-prpencvf.c > b/drivers/staging/media/imx/imx-ic-prpencvf.c > index dd9d499..c43f85f 100644 > --- a/drivers/staging/media/imx/imx-ic-prpencvf.c > +++ b/drivers/staging/media/imx/imx-ic-p

Re: [PATCH v4 28/36] media: imx: csi: fix crop rectangle changes in set_fmt

2017-02-16 Thread Russell King - ARM Linux
On Wed, Feb 15, 2017 at 06:19:30PM -0800, Steve Longerbeam wrote: > diff --git a/drivers/staging/media/imx/imx-media-csi.c > b/drivers/staging/media/imx/imx-media-csi.c > index ae24b42..3cb97e2 100644 > --- a/drivers/staging/media/imx/imx-media-csi.c > +++ b/drivers/staging/media/imx/imx-media-csi

RE: [PATCH v3 6/7] dt-bindings: media: Add Renesas R-Car DRIF binding

2017-02-16 Thread Ramesh Shanmugasundaram
Hi Rob, Thank you for the review comments. > Subject: Re: [PATCH v3 6/7] dt-bindings: media: Add Renesas R-Car DRIF > binding > > On Tue, Feb 07, 2017 at 03:02:36PM +, Ramesh Shanmugasundaram wrote: > > Add binding documentation for Renesas R-Car Digital Radio Interface > > (DRIF) controller

Re: [GIT PULL FOR v4.11] MediaTek JPEG encoder

2017-02-16 Thread Matthias Brugger
On 13/02/17 13:00, Mauro Carvalho Chehab wrote: Em Mon, 13 Feb 2017 11:52:07 +0100 Hans Verkuil escreveu: Hi Mauro, This adds the MediaTek JPEG encoder to the media subsystem. This patch https://patchwork.linuxtv.org/patch/38645/ needs to go through Matthias Brugger, Why? It seems easier

Re: [PATCH v4 18/36] media: Add i.MX media core driver

2017-02-16 Thread Russell King - ARM Linux
On Wed, Feb 15, 2017 at 06:19:20PM -0800, Steve Longerbeam wrote: > Add the core media driver for i.MX SOC. > > Signed-off-by: Steve Longerbeam Just as I reported on the 30th January: Applying: media: Add i.MX media core driver .git/rebase-apply/patch:614: new blank line at EOF. + .git/rebase-a

Re: [PATCH v4 23/36] media: imx: Add MIPI CSI-2 Receiver subdev driver

2017-02-16 Thread Russell King - ARM Linux
On Wed, Feb 15, 2017 at 06:19:25PM -0800, Steve Longerbeam wrote: > Adds MIPI CSI-2 Receiver subdev driver. This subdev is required > for sensors with a MIPI CSI2 interface. > > Signed-off-by: Steve Longerbeam Just like I reported on the 30th January: .git/rebase-apply/patch:236: trailing white

Re: [PATCH] staging: media: use octal permissions

2017-02-16 Thread Sean Young
On Wed, Feb 15, 2017 at 04:27:01PM -0600, d...@cako.io wrote: > Replace all instances of permission macros with octal permissions > > Signed-off-by: David Cako > --- > drivers/staging/media/lirc/lirc_parallel.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/

Re: [PATCH v2 3/3] [media] dvbsky: MyGica T230C support

2017-02-16 Thread Antti Palosaari
On 02/16/2017 10:48 AM, Antti Palosaari wrote: On 02/16/2017 01:31 AM, Stefan Bruens wrote: +/* attach demod */ +memset(&si2168_config, 0, sizeof(si2168_config)); prefer sizeof dst You mean sizeof(struct si2168_config) ? yeah. See chapter 14 from kernel coding style documentation

Re: [PATCH v2 3/3] [media] dvbsky: MyGica T230C support

2017-02-16 Thread Antti Palosaari
Hello On 02/16/2017 01:31 AM, Stefan Bruens wrote: Hi Antti, first thanks for for the review. Note the t230c_attach is mostly a copy of the t330_attach (which is very similar to the t680c_attach), so any of your comments should probably applied to the other attach functions to have a common cod